Create new branch from issue for repo-less project using new branch button
Resources
PM @victorwu | UX @pedroms | FE @annabeldunstone | BE @vsizov
Problem
As part of rounding out I2P (#25986 (closed)), we want to allow a user to quickly create an app and deploy it to production, even without doing in depth code development. The flow with relevant steps is:
- Create a project and create an issue.
- Create a simple hello-world-style app by adding source code files to the project all within GitLab.
- Deploy the code.
We want to be able to do all of this through the GitLab interface itself, without even creating a repo outside of GitLab. This is part of the I2P flow. And in addition, it allows a user to verify the end-to-end set up without even having to worry about code itself.
GitLab allows you to do this currently, but not from within the issue interface itself. This issue reduces that friction.
Description
- Currently, if you have a repo-less project, from within an issue, if you click the
New branch
button, it redirects you to the project page. - With this change, when you click the
New branch
button, the system should automatically create the master branch in the background with a blankREADME.md
file. - Then, it should create a new branch automatically. If a deployment project service is not enabled, GitLab should bring you to the new branch's page.
- If a deployment project service (e.g. Kubernetes) is enabled, redirect the user to the New file screen as if he had pressed the Set up auto deploy button (present on the Project screen), filling in all the fields (file name, commit message and target branch). On this screen, show an alert "Branch
new-branch-name
was created. To set up auto deploy, choose a GitLab CI Yaml template and commit your changes. About auto deploy”. The “About auto deploy” link opens the documentation page in a new window.