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

Use connected GitHub account to create a repo from template #134

Open
mpeterdev opened this issue Nov 2, 2022 · 1 comment
Open

Use connected GitHub account to create a repo from template #134

mpeterdev opened this issue Nov 2, 2022 · 1 comment
Assignees

Comments

@mpeterdev
Copy link
Collaborator

Implement the flow which creates a repo in a user's GitHub account from a template. This flow is initiated by a button on the template details page.

Use the diagram (and associated comments) in the bottom right of this document as a guide for the flow, which auth being presented in a modal over the template details page.

The GitHub provider must have the public_repo scope added. Info on the GitHub provider is here

After successfully authenticating w/ GitHub with the proper scope, the result will contain a GitHub OAuth token. This is demonstrated in the provider documentation. Look for the following lines in their code example

// This gives you a GitHub Access Token. You can use it to access the GitHub API.
const credential = GithubAuthProvider.credentialFromResult(result);
const token = credential.accessToken;

Store this token in our AuthStore in Zustand which was implemented in the feat/public-mode branch. Ensure that has been merged or branch off of it

Offer the user a modal to name the repo that will be created for them. The field should be prepopulated with the same name as the template repo. Confirmation of the modal should make an API call to this endpoint to execute creation of the repo.

@mpeterdev
Copy link
Collaborator Author

This is on hold while the GitHub integration is being revisited

@exalate-issue-sync exalate-issue-sync bot changed the title MVP Template repo creation flow Use connected GitHub account to create a repo from template Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant