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

[BUILD-960] fix: Tag-to-slug conversion with number later in tag part #1064

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

RisingOrange
Copy link
Collaborator

@RisingOrange RisingOrange commented Jan 7, 2025

For some tags the tag-to-slug conversion results in a slug with extra numbers.

For example:
#AK_Step1_v12::#FirstAid::01_Biochem::03_Laboratory_Techniques::02_CRISPR/Cas9
currently results in this slug:
step1-fa-1-3-29
while it should be this:
step1-fa-1-3-2

Related issues

https://ankihub.atlassian.net/jira/software/c/projects/BUILD/boards/1?selectedIssue=BUILD-960

Proposed changes

  • Only use numbers from beginning of the tag parts
  • Handle invalid tags where tag part doesn't start with number correctly - by returning None
  • Add tests
  • Update pycln (precommit)
    • This fixes an error that was happening in the precommit GHA

@RisingOrange RisingOrange requested a review from a team January 7, 2025 09:19
@RisingOrange RisingOrange changed the title [BUILD-960] fix: Tag to slug conversion with number later in tag part [BUILD-960] fix: Tag-to-slug conversion with number later in tag part Jan 7, 2025
@pedroven pedroven merged commit a879e48 into main Jan 7, 2025
7 checks passed
@pedroven pedroven deleted the fix/tag-to-slug-conversion branch January 7, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants