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

πŸ“… 5/20 @ 1pm PT - copy GitHub repositories with issues, labels, milestones, and assignees #16

Closed
6 tasks done
gr2m opened this issue May 19, 2021 · 9 comments
Closed
6 tasks done
Labels
show Preparation issue for a live show

Comments

@gr2m
Copy link
Owner

gr2m commented May 19, 2021

πŸ’πŸ» copy GitHub repositories with issues, labels, milestones, and assignees
πŸ“… Wednesday, May 20, 2021
πŸ• 1pm Pacific Time (in your timezone)
πŸŽ™οΈ maybe @xavt?
🏷️ Testing


copy GitHub repositories with issues, labels, milestones, and assignees

This show is a follow up the idea described at #12. The goal is to create a script to reliably transfer issues from one repository to another. However, before we can write such a script we need a test setup which permits us to quickly create repositories with issues to transfer for testing. The test setup is the scope for this show

Outline

  • Template repositories and how to create a new repository based on a template using the REST API
  • Retrieve all issues, labels, milestones, collaborators, and assignees from a repository using GraphQL
  • Create the issues and comments with the same meta information as in the source repository

Recording

image

Shownotes

Preparation

  • Create a test organization with template repositories and collaborators: @Another-Practice-Organization (thanks @xavt)
  • Prepare a GraphQL query to fetch issues, labels, milestones, collaborators, and assignees
  • Create a web app to create user-to-server tokens in order to safely share tokens between users that are limited by a GitHub app's permissions and installs.
@gr2m gr2m added the show Preparation issue for a live show label May 19, 2021
@gr2m
Copy link
Owner Author

gr2m commented May 19, 2021

One interesting challenge is to remain authorship of the issues when copying. Our script would require an OAuth token for each user that created an issue or a comment.

Sharing personal access tokens for real user accounts is not a good idea, and tokens received from OAuth Apps cannot be restricted to a single organization either. The best approach would be to register a GitHub App, install it on the @Another-Practice-Organization organization, and then use the OAuth flow for the app to create user-to-server tokens, because these tokens in fact are restricted to the app's installations.

@gr2m
Copy link
Owner Author

gr2m commented May 20, 2021

πŸ”΄ going live now at https://www.twitch.tv/gregorcodes

@gr2m
Copy link
Owner Author

gr2m commented May 20, 2021

The episode is now on Twitch: https://www.twitch.tv/videos/1029411115

image

@johnjsatter
Copy link

Hey guys. Ty so much. Can I add assign you?

@gr2m
Copy link
Owner Author

gr2m commented May 20, 2021

Glad you like it :)

I'm sorry but I don't understand what you mean with "Can I add assign you?"? Can you explain please?

@johnjsatter
Copy link

I just meant add/ assign you as a contact to my private repository

@johnjsatter
Copy link

Thank you so much for the comment. Everyone’s helping and I see that. Ty

@gr2m
Copy link
Owner Author

gr2m commented May 21, 2021

I just meant add/ assign you as a contact to my private repository

I cannot provide 1:1 support for free I’m afraid. But if you have any questions about the current topic you can always ask here

@gr2m
Copy link
Owner Author

gr2m commented May 21, 2021

The recording of the video is now on YouTube:
https://www.youtube.com/watch?v=zrVfQbiWLbE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
show Preparation issue for a live show
Projects
None yet
Development

No branches or pull requests

3 participants
@gr2m @johnjsatter and others