Add forge_convert_labels.py to convert to templated labels (#1) #3
No reviewers
Labels
No labels
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
pr2jira
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/forge-helpers!3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "label-convert"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As part of the Pagure migration process, per-repo labels were
created to match Pagure's labels, priorities and statuses. But
in Forgejo we also have similar quality org-wide labels templated
from instance-wide labels, which is confusing and redundant.
This script runs on a Forgejo repo and removes the per-repo
priority labels, replacing them with the templated priority
labels. It also replaces 'bug' with 'Work Item/Bug' and
'task' with 'Work Item/Task', since they seem pretty good
equivalents.
We use color to distinguish between the per-repo and templated
priority labels as they actually have the exact same names. The
colors for the 'bug' and 'task' labels seem pretty consistent
from repo to repo, except one outlier where the 'task' color
was different; it's easy to edit on the fly if necessary.
Signed-off-by: Adam Williamson awilliam@redhat.com
This script is referenced in the forge migration docs, but this PR is still unmerged. Is it ready for use?
@kparal ? Was still waiting on your review, I guess.
As far as I'm concerned it's fine to use, but you might have to tweak it a bit to match the labels you actually want/need to migrate for your org/projects.
Sigh, sorry, wanted to do it after the F44 cycle. But since Adam tested it in a real-world usage already, I'll just merge this ASAP. I can do a more detailed review later, if there's time. (I originally wanted to make it a bit more flexible, but that can happen some other time).
@adamwill Would you be so kind and add a short usage example into README as part of this PR, before I merge this?
Please add a README example with a couple of useful hints on how a general audience can use this, thanks.
f0354e1d80to9cd4def047I went a bit further and split the replacements mapping out into a JSON file that can be replaced, so it's easier to use this for other orgs/repos. And added the doc section.
maybe I should use Path instead of str for this...meh.
9cd4def047to79855da7beThanks, merged.
Btw, adding new commits during review is better for comparing changes, rather than rewriting commits and force-pushing. The PR can be squashed before merging.