-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Change/remove a branch of an open issue #9080
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c7d3b19
Add field with isIssueWriter to front end
0e106f0
Make branch field editable
de06054
Switch frontend to form and POST from javascript
c99c280
Add /issue/id/ref endpoint to routes
c41a8a9
Use UpdateIssueTitle model to change ref in backend
b84622d
Removed crossreference check and adding comments on branch change
668d3c0
Merge branch into master
92a031f
Use ref returned from POST to update the field
7d339c1
Prevent calling loadRepo from models/
20f10af
Branch/tag refreshed without page reload
9e36b25
Remove filter for empty branch name
bb1b87f
Add clear option to tag list as well
8b68d5d
Delete button translation and coloring
fbf7ad9
Fix for not showing selected branch name in new issue
619a128
Merge master into branch
0eac4b6
Merge master into branch
2bd8e64
Check that branch is not being changed on a PR
f8a70ce
Merge master into branch
b913c6e
Change logic
6c8e3e0
Merge remote-tracking branch 'upstream/master' into change-issue-branch
d7cd33e
Notification when changing issue ref
c74afb9
Merge branch 'master' of git://github.com/go-gitea/gitea into change-…
c0a77d4
Merge branch 'master' of git://github.com/go-gitea/gitea into change-…
52f6763
Fix for renamed permission parameter
7d97d58
Fix for failing build
f8f8d13
Apply suggestions from code review
aeb173b
Merge branch 'master' into change-issue-branch
zeripath 0fc8d10
Merge branch 'master' into change-issue-branch
lunny def127d
Merge branch 'master' into change-issue-branch
techknowlogick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,20 @@ func ChangeTitle(issue *models.Issue, doer *models.User, title string) (err erro | |
return nil | ||
} | ||
|
||
// ChangeIssueRef changes the branch of this issue, as the given user. | ||
func ChangeIssueRef(issue *models.Issue, doer *models.User, ref string) (err error) { | ||
oldRef := issue.Ref | ||
issue.Ref = ref | ||
|
||
if err = issue.ChangeRef(doer, oldRef); err != nil { | ||
return | ||
} | ||
// TODO: implement notifications | ||
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. We need a new notification - change branch |
||
//notification.NotifyIssueChangeTitle(doer, issue, oldRef) | ||
|
||
return nil | ||
} | ||
|
||
// UpdateAssignees is a helper function to add or delete one or multiple issue assignee(s) | ||
// Deleting is done the GitHub way (quote from their api documentation): | ||
// https://developer.github.com/v3/issues/#edit-an-issue | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.