-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Create a branch from an issue, with pull/merge request #20226
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
Comments
I was just thinking the same thing :) If we could allow the branch name to be templated that would be a +1 on gitlab/hub It would be great to see this and it's probably a template/UI change with maybe a setting in the repo settings to provide the template for the branch name. Also, I wouldn't want to create a branch until the ticket was assigned, so some automation here would be great to see. A repo settings checkbox perhaps to "create issue branch on assignment", "create on label added " etc The MVP would be just to add in the create branch option inside the issue and allow for manual branch name. |
Anyone who working on this? |
This is just a different development model, and I appreciate it. The major points about the GitLab model is:
From my perspective, if an issue will definitely need at least one branch and at least one PR associated with that branch, it's a productivity gain to just make them both, all linked together and to the issue, with one action. GitHub and Azure's model involves more effort for no real extra gain in power or flexibility, and Gitea's is all manual at the moment. I also thought the GitLab way was weird at first, but it does save some busywork. |
I think the feature would be very nice from people migrating over from gitlab. I work on a self-hosted gitlab instance in my company, and I am not happy about how slow it runs. Please have mercy with me and all the others and consider implementing this feature 🙏 🙏 🙏 ( 😉 ) But srsly though: The feature would be nice IMHO. |
My only hope, Gitea won't become overcomplicated like others. I wish I can still have a small cup of tea 😉 |
@fairking I agree. This is actually something that I've been handling client-side. I have a custom git command called A browser extension or userscript could probably do the same thing, now that I think of it. (edit: I have since turned berx into a Userscript) Edit: Another thing that occurs to me, looking at my command, is that there's a lot of busywork in creating a branch for an issue, opening the PR, linking the branch, and also giving the PR the same assignee+labels+due date+etc as the issue. There aren't a lot of situations I can think of that a PR and its associated issue should differ on labels or assignee, or most of the other metadata like project and milestone when they're linked one-to-one. At least on PR creation, copying the issue's metadata is a nice convenience. |
An obvious requirement is to create a branch from an issue. The PR does need to be created after the branch is completed. Perhaps an additional function to create a PR on the current issue can be provided. |
hello, is this feature still being developed ? |
Nobody are working on this issue. |
Hi guys, I just would like to bring to attention this topic again. I had a chance to work with gitea recently (v. 1.21.2) and I was very confused with the option to create a new issue from PR. Please have a look at the screenshot bellow: So literally gitea team thinks that the code changes needs to be done first, and then an issue is created. I am completely confused by it and it completely makes my brain hurt. Please someone could help me to understand what is the actual flow of working on the code with gitea. In my 20 years of experience this first thing you do is to gather user requirements and draw an issue/feature first, discuss it with users, and then you write the code (by creating a branch), and then you create a PR for approval. Not the other way around. I don't think (IMHO) gitea is going into good direction. If someone writes code first, and then defines an issue/spec is very very bad idea. 👎 P.S. I also just realized, the gitea repo code changes in 99% are just pure PRs, so nobody solves user issues, but works on something else. In my case is unacceptable. The PR should close an existing issue, not open a new one. But again I may be wrong. The Code changes without community discussion... |
This is not PR first and issue later. It means, you can create a new issue from an issue/pr/comments if you find it related to another problem but you don't want to discuss/resolve in the same place. And that's another feature that is not the same as the current. And I think your suggestion is great to require an issue before sending a PR. |
Hi, So will it come or should I use Gitlab? Best |
I'm interested in sending a PR to implement that. |
#31899 supports creating branches and pull requests from the new sidebar section |
Feature Description
There is a workflow that uses issues to define tasks to do and then work branches to do the issue's work in. When the work is done, the branch will be merged into master/main. It saves a lot of manual work if the Git tool already creates a work branch from an issue and also a merge/pull request for it with the corresponding "Closes issue ..." message.
GitLab does this and I'm using it a lot. GitHub also does this but that's not (yet?) reflected in Gitea's feature comparison.
It has been asked before but was closed. Not sure why because it was neither implemented nor rejected and can't be reopened for some reason. Here's a second try.
Screenshots
GitHub
GitLab
(Clicking the button, not its dropdown menu, would immediately create the branch and MR)
The text was updated successfully, but these errors were encountered: