-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Display warning when user try to rename default branch #24512
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
Changes from 2 commits
df9b6d2
56f25c1
bc724ca
2e2071f
1535cb0
d944aaf
439855f
e96bddd
410055a
7d955f3
db6d593
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ | |
{{end}} | ||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted) (not $.IsMirror)}} | ||
<button class="ui tertiary button show-modal show-rename-branch-modal gt-mx-3" | ||
data-is-defualt-branch="true" | ||
data-modal="#rename-branch-modal" | ||
data-old-branch-name="{{$.DefaultBranch}}" | ||
data-tooltip-content="{{$.locale.Tr "repo.branch.rename" ($.DefaultBranch)}}" | ||
|
@@ -158,6 +159,7 @@ | |
{{end}} | ||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted) (not $.IsMirror)}} | ||
<button class="ui tertiary button show-modal show-rename-branch-modal gt-mx-3" | ||
data-is-defualt-branch="false" | ||
data-old-branch-name="{{.Name}}" | ||
data-modal="#rename-branch-modal" | ||
data-tooltip-content="{{$.locale.Tr "repo.branch.rename" (.Name)}}" | ||
|
@@ -229,6 +231,9 @@ | |
<form class="ui form" action="{{$.Repository.Link}}/settings/rename_branch" method="post"> | ||
<div class="content"> | ||
{{.CsrfTokenHtml}} | ||
<div class="field default-branch-warning"> | ||
<span class="text red">{{.locale.Tr "repo.branch.warning_raname_default_branch"}}</span> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have to point out again (I have left too many trivial comments for this PR): here , warning_r[a]name_default_branch, above: warning_r[e]name_default_branch Please be careful!!!! And wolfogre has told you "And the typo raname needs to be fixed elsewhere as well." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for the mistake, should I create a PR to fix the typo? |
||
</div> | ||
<div class="field"> | ||
<span class="text" data-rename-branch-to="{{.locale.Tr "repo.branch.rename_branch_to"}}"></span> | ||
</div> | ||
|
Uh oh!
There was an error while loading. Please reload this page.