-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 possibility to record branch information in an issue #780
Conversation
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.
I'd like to hear the @go-gitea/owners opinion on whether we will accept or not this feature.
options/locale/locale_en-US.ini
Outdated
@@ -531,6 +531,7 @@ issues.new.closed_milestone = Closed Milestones | |||
issues.new.assignee = Assignee | |||
issues.new.clear_assignee = Clear assignee | |||
issues.new.no_assignee = No assignee | |||
issues.noBranch = No Branch Specified |
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.
noBranch
-> no_branch
templates/repo/issue/new_form.tmpl
Outdated
<input id="branch_selector" name="branch" type="hidden" value="{{.branch}}"> | ||
<div class="ui floating filter select-branch dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}"> | ||
<div class="ui basic small button"> | ||
<span class="text branch-name">{{if .branch}}{{.branch}}{{else}}{{.i18n.Tr "repo.issues.noBranch"}}{{end}}</span> |
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.
noBranch
-> no_branch
@@ -253,6 +253,26 @@ | |||
|
|||
<div class="four wide column"> | |||
<div class="ui segment metas"> | |||
<div class="ui disabled floating filter select-branch dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}"> | |||
<div class="ui basic small button"> | |||
<span class="text branch-name">{{if .Issue.Branch}}{{.Issue.Branch}}{{else}}{{.i18n.Tr "repo.issues.noBranch"}}{{end}}</span> |
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.
noBranch
-> no_branch
I think this PR is good point, but maybe also need tag or commit? Of course, put it in v1.2 is a correct decision. @andreynering |
I've implemented the requested changes from noBranch to no_branch |
@lunny better to track the branch only. GitLab also has this feature, very useful when an issue has many PRs 👍 |
I like this feature, but I would like to be able to also select a tag. Pretty good for bug reports for deployed applications. |
Do I need to do anything with it to merge ? |
I will really review this after 1.1 released. |
@gzsombor could you add tag selection also? |
conflict |
Patch is updated with tag selection |
What do you think? |
@gzsombor I will review this again. |
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.
Just semanital cleanup, otherwise LGTM
models/issue.go
Outdated
@@ -49,6 +49,7 @@ type Issue struct { | |||
IsPull bool `xorm:"INDEX"` // Indicates whether is a pull request or not. | |||
PullRequest *PullRequest `xorm:"-"` | |||
NumComments int | |||
Branch string |
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.
Maybe call this Ref
instead, since we can track both Branches and Tags?
modules/auth/repo_form.go
Outdated
@@ -194,6 +194,7 @@ func (f *NewSlackHookForm) Validate(ctx *macaron.Context, errs binding.Errors) b | |||
type CreateIssueForm struct { | |||
Title string `binding:"Required;MaxSize(255)"` | |||
LabelIDs string `form:"label_ids"` | |||
Branch string `form:"branch"` |
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.
Same here, Ref
options/locale/locale_en-US.ini
Outdated
@@ -600,6 +600,7 @@ issues.new.closed_milestone = Closed Milestones | |||
issues.new.assignee = Assignee | |||
issues.new.clear_assignee = Clear assignee | |||
issues.new.no_assignee = No assignee | |||
issues.no_branch = No Branch Specified |
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.
issues.no_ref = No Branch/Tag Specified
I've fixed the issues |
LGTM |
LGTM |
After 8 years, this "branch selector" does nothing more than saving the branch/tag name into database and display it. Are there real users who uses this feature? If no, could it be removed in new versions? |
For anyone who still needs it, please provide feedbacks to Prepare to remove the branch/tag selector in the issue sidebar #32744 |
No feedback, then this "branch/tag selector" will be removed in 1.23 |
This patch add a new field to the 'issue' entity, named 'branch' with the necessary UI to specify which branch this issue is referring.
Searching, filtering and editing is not yet implemented, so the branch can only specified when creating the issue