Skip to content

[Feature]: Auto-create github repo on cargo shuttle init #988

Closed
@beyarkay

Description

Describe the feature

It would be super slick if one of the options in the cargo shuttle init workflow was to create a GH repo and setup CI/CD on the user's behalf.

The process might look something like:

  1. If the user says yes, create a new github repo on the user's behalf (initialised with the shuttle GH workflow)
  2. Continue the regular initialization process
  3. After the project code is initialized, push the project to github.
  4. Give the user a link so they can see the github runner compiling and deploying their new project.

If logging in with GitHub gives shuttle a GH API key, then this shouldn't require any additional authentication by the user. If the user has to go into GitHub and get an API key for shuttle to use, then this feature probably isn't worth it.

Since users log in with GitHub, would cargo shuttle init be able to make authenticated calls to the GitHub API to create a new repo on their behalf?

Suggestion or Example of how the feature would be used

$ cargo shuttle init
How do you want to name your project? It will be hosted at ${project_name}.shuttleapp.rs.
✔ Project name · my-new-project

[omitting the other steps that init takes]

? Should we create a new GitHub repository and set it up with our GitHub actions workflow? (y/n) › yes

 Adding github workflow to project...
 Creating repository https://github.com/MY_USERNAME/my-new-project...

 Done! Your project will auto-deploy every time you push to the `main` branch on GitHub.

So when the user uses cargo shuttle init, it will not only setup the project locally, but also setup CI/CD for them.

Maybe it would be a good idea to require that tests pass before deploying, but that's a different discussion.

Duplicate declaration

  • I have searched the issues and this feature has not been requested before.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions