Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a simple way to rename branch like gh #15870
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
Add a simple way to rename branch like gh #15870
Changes from all commits
30ee9c7
b51c6a7
7059da8
83ab12d
6034e84
7d79bba
9e5d9aa
71983a2
c01d4d2
7216645
076c913
2be6c91
57fc738
ddae9e4
5408d40
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I seeing this wrong, or is it a bad idea to automatically apply branch protection to a "new" branch without testing if that branch should be protected?
Because in the current implementation, if I see this correctly, the following would lead to an inconsistent state:
m.*
main
is a protected branchmain
->default
.default
now has branch protection even though it shouldn't.Furthermore, if I see that correctly, the type of branch protection also needs to be switched then if this branch is covered by another rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sadly, gitea don't have the feature to protect more than one branches by one rule.
each branch protect rule only applied to one brach. so when the branch was renamed.
the old config is not usefull, which should be binded to new branch or be removed, I think bind it
to new branch is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks for the clarification. I did not need to set up branch protection on Gitea until now, I thought it was implemented just as in GitHub using a pattern for branches. Gitea's approach definitely has its advantages as well as its disadvantages.
In that case, I completely understand why you keep the branch protection. Makes total sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I have seen, the underscore (
_
) syntax is uncommon for routes. What about/branches/rename
instead? That would then beCombined with a change inside the UI dialog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well I dont mind since it's only a web route - if you like to group settings bit more refactor pulls are welcome :)