Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate short id based on ULID instead of serial ids #82

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

golanglemonade
Copy link
Member

  • Removes the Prefixed Serial IDs
  • Uses a hook to set a short ID based on the objects ULID ID, truncated to the length specified
  • Adds a index for owner_id + display_id, this allows the chance of collisions to be decreased while still allowing a short ID
  • Allows override of the index fields
  • Allows override of the length
  • Renames the field from Identifier to DisplayID

New IDs will look like:

go run cmd/cli/main.go task create -t "Review access to systems - CC5.2" 
  ID                          DISPLAYID   TITLE                             DESCRIPTION  DETAILS  ASSIGNEE  ASSIGNER                    STATUS  DUE  
  01JJ0ADC1Z5N0HE5WKQ3KYZJYS  TSK-7POWTK  Review access to systems - CC5.2                                  01JJ08Y8W5WRFHP5NM4SVSEWZY  OPEN     

@golanglemonade golanglemonade requested a review from a team as a code owner January 19, 2025 22:20
@github-actions github-actions bot added enhancement New feature or request mixin labels Jan 19, 2025
Signed-off-by: Sarah Funkhouser <[email protected]>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 20%)

See analysis details on SonarQube Cloud

@golanglemonade golanglemonade merged commit 59a9a43 into main Jan 20, 2025
9 of 10 checks passed
@golanglemonade golanglemonade deleted the feat-generate-short-id branch January 20, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mixin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants