Skip to content

Conversation

kclowes
Copy link
Collaborator

@kclowes kclowes commented Sep 24, 2025

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

@danceratopz danceratopz added the Finalize Weld Tracks issues/PRs that are necessary to bring the weld to completion. label Sep 25, 2025
Copy link
Member

@danceratopz danceratopz left a 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.

f" Translating labels: {', '.join(labels)} -> {', '.join(translated_labels)}"
)
labels = translated_labels

Copy link
Member

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.

@chfast
Copy link
Member

chfast commented Sep 29, 2025

Why don't you use the "issue transfer" feature? https://cli.github.com/manual/gh_issue_transfer

@kclowes
Copy link
Collaborator Author

kclowes commented Sep 29, 2025

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!

@kclowes
Copy link
Collaborator Author

kclowes commented Sep 30, 2025

Updated and tested! Much cleaner :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Finalize Weld Tracks issues/PRs that are necessary to bring the weld to completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants