-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Automate and improve issues transfer #12
Comments
That shouldn't be a problem, it will just take a while
That should be possible with https://docs.github.com/en/graphql/reference/mutations#transferissue that you already linked
that will be more tricky. You'd have to copy over milestones and labels. You will only be able to assign people who are either collaborators on the issue or who commented on the issue
I don't think that will be possible. I'm not sure if the transfer itself will send any notifications, but I think adding labels, milestones, and assignees will.
Is this for a single repository or multiple repositories from which you want to move issues from? Are the repositories public? |
Transfer does generate notifications, labelling and milestoning don't. Assigning doesn't except maybe for the person who gets assigned (not sure about that one). Massive issue transfers from anywhere to anywhere without triggering notifications is also possible with the issue import API but it doesn't keep the authors of the issue and comments (see https://gist.github.com/jonmagic/5282384165e0f86ef105 / https://www.theozimmermann.net/2017/10/bugzilla-to-github/ for details). |
Thanks for your answers :) It is from a single repository to a single repository, both private. So basically it will be a "2 steps", first transfering the issues, then adding the missing info (labels etc...) |
Overall this seems to be a common enough problem, I'd be happy to do an episode on it. We would need a test setup with public repositories, one that we can easily reproduce for testing. I think we'll have to create a script which creates two repositories with some labels and milestones, and assignees. Otherwise it will be hard to test the script. We can create that test scenario script part of the show, too. Can you create a test GitHub organization with two repositories that we can use as templates? That would be a good starting point. Once we have that we should agree on what the script will do exactly. We could start a repository with just a README that documents the non-existing CLI, and then make it real during a show?
That API isn't documented, I don't know the state of it, it might likely be removed if it hasn't already? Could you inquire GitHub support about its state? https://support.github.com/contact You might also ask support if they can do the transfer for you without the noise from the transfer notifications? |
Awesome for this idea to start an episode!
Github support confirmed me this endpoint is still working ans won't create notifications: https://gist.github.com/jonmagic/5282384165e0f86ef105 |
Sounds great, thanks for confirming! I'd prefer to use the official transfer issue APIs, it will make it future proof and more usable to others, does that work for you? I'd suggest we rename the repositories
Then create some issues in the source, with labels, milestones, assignees then create some of the labels and milestones in the target repositories to make sure the script handles conflicts correctly. Next we have to create a script that creates a new repository based on an existing one, including issues, labels, milestones, and collaborators, for our use case. We could make this part of the show, or the first part of it, might be interesting in and of itself? How is your availability? I'm trying to do two shows per week, I've nothing scheduled after this week yet: |
Nice! The transfer issue API would be the way; The repositories have been renamed (and I discover in the process the "template repository" option) Ok to generate some content in both, I'll do it later today;
Or "targets another repository" instead of "creates a new repository" ;) like @Zimmi48 mentionned we'll have to check for notifications (what they are when we transfer the issue/comment/assign) AND the rate limitations for mass transfer (I'm thinking of 10k issues transfer); is there such a thing as an organization/repository wide notification setting that we could toggle with the script? You decide what you'd like to put on your show :) ! |
That's a good point. One of the advantages of the issue import API was precisely to get higher rate limits. Notification-triggering actions generally have lower rate limits. As I note in the blog post mentioned above, "the GitHub API was limiting issue creation to 300, after what it refused any new posting for the next 30 minutes" before I converted it to use the issue import API. |
Nice post and details on this blog post
and that's why we should avoid this API then. The transfer feature on the other end (triggered through the UI at least) does move a lot of things like one would like! |
sorry I'm a little late, but I'm planning on doing a show tomorrow at 1pm, you are all welcome to join! I'll post details soon. But I'll focus on creating a script that will copy an existing repository including issues, labels, assignees and milestones, as a means of preparation for another show about the actual issue transfer script |
I only now realize this is not the original request by @xavt. The issue import API is not helpful when the source of the issues is another repository, because the import API does not close existing issues in that source repository. I'm happy to make a separate show about the issue import API once it's documented by GitHub and considered stable. Until then it's better to reach out to support directly, because they have much more information on the APIs than I do. @Zimmi48 Can you reach out to support and ask them about the state of the issue import API, if there is any plan to make it official? |
@gr2m i would live to join if possible |
@johnjsatter can you give me a short intro and a way how I can send you an invite link later? What's your interest in the episode, what do you hope to get out of it? |
@gr2m hi! Well I stumbled into the community and making every effort to be righty within the community. I may have upset some people along the way. I want learn as much as possible but here are my priorities. Secure email w/ ProtonVPn (Ashestohelens@....) I need an API key, I also think I had one with google but am a little reluctant to be outside of GitHub or DevHub. I am sure I can get a lot out of it |
I'm not sure what that means? Is the email domain |
I hope I can get back there |
@johnjsatter I got an error message |
Yea. It’s not set up yet. I’m sorry. This is the only place I can communicate |
On Thursday, I'll do a show on actually creating the script: You can ask questions there if you like, before and after the show |
Following your suggestion to open an issue to make a sugestion, here's one idea:
"Automate and improve issues transfer"
Here's a goal:
We got a few parts here and there:
But no definite solution! What would be your take on it?
Maybe this could be a nice experiment to stream about.
The text was updated successfully, but these errors were encountered: