-
Notifications
You must be signed in to change notification settings - Fork 174
Script to move EEST issues to EELS #2204
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for getting on this @kclowes, especially the testing!
Small comment to avoid having to any manual patching up if labels don't exist in the target repo.
scripts/transfer_issues.py
Outdated
f" Translating labels: {', '.join(labels)} -> {', '.join(translated_labels)}" | ||
) | ||
labels = translated_labels | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the description:
This will transfer labels if they exist on both repos and can translate one label to another.
I think we should add these labels ahead of time (also to help us to agree on our label set), this is:
My suggestion would be to error out (or verbosely skip) if the label doesn't exist in the target repo and abort the transfer. If successfully transferred issues get closed, it should be trivial to run the script again without any side effects.
Why don't you use the "issue transfer" feature? https://cli.github.com/manual/gh_issue_transfer |
Thanks @chfast. That does simplify the logic. I was going too fast only focused on whether or not it worked, not the actual code. Will update! |
Updated and tested! Much cleaner :) |
We shouldn't need to merge this one, but would love any feedback around testing it out. It's pretty sloppy, but I'm less concerned about style and more concerned about the functionality since it's not something we'll maintain. This script will move issues from one repo to another and close the issues that get moved.
There are flags to do a
--dry-run
and--limit
so we can test it out ahead of time on the actual repos.This will transfer labels if they exist on both repos and can translate one label to another. Also transfers milestones if they exist on both repos. Assignees will transfer, but I'm not sure if they have to have maintainer status in order for them to transfer. See #2143 for more functionality details around sub-issues.
As seen in the script, I made up a couple test repos to test things out. Feel free to play around with those if you'd like to test!
cc @danceratopz