-
-
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
Change/remove a branch of an open issue #9080
Conversation
668d3c0 Merged master into branch (I messed up commit message) |
Codecov Report
@@ Coverage Diff @@
## master #9080 +/- ##
==========================================
- Coverage 42.25% 42.23% -0.03%
==========================================
Files 610 610
Lines 80372 80419 +47
==========================================
+ Hits 33965 33966 +1
- Misses 42227 42272 +45
- Partials 4180 4181 +1
Continue to review full report at Codecov.
|
@vedranMv Could you give any screenshot? |
routers/repo/issue.go
Outdated
|
||
ref := ctx.QueryTrim("ref") | ||
if len(ref) == 0 { | ||
ctx.Error(204) |
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.
How can the user remove the target 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.
So far it can't, however, that's the same problem as when you try to create an issue - once selected, the branch can't be removed short of refreshing the page. I'll look into it
And thanks for all the feedback, it's pretty useful :)
20f10af addresses all but one concern, deleting a branch. |
Can a ficticious blank (" ") branch name added at the end of the list as a placeholder? |
That's why I like reviews :D I have a tendency to overcomplicate sometimes. I'll fix it later today |
How about 8b68d5d ? There's now a button which appears only when issue has a ref assigned to it? :) The drawback of this button is that page now has to be refreshed when selecting a branch otherwise the branch list doesn't get updated and you either can't see the 'clear ref' button after the branch has been selected, or it stays there after you've cleared a 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.
This works like a treat!
You may want to update the title of this PR though, to mention the possibility of branch removal. 😉
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Compiles and works as intended. What am I missing here for build to pass? :) |
@vedranMv |
Codecov Report
@@ Coverage Diff @@
## master #9080 +/- ##
==========================================
- Coverage 43.30% 43.24% -0.06%
==========================================
Files 647 648 +1
Lines 71800 71922 +122
==========================================
+ Hits 31090 31102 +12
- Misses 35675 35779 +104
- Partials 5035 5041 +6
Continue to review full report at Codecov.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
Hi, will this get merged in 1.13.0? That's would be really helpful instead of using ref #issue in the commits. |
Co-authored-by: zeripath <art27@cantab.net>
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 If no feedback, then this "branch/tag selector" will be removed in 1.23 |
Fix #3620 This PL addressed inability to change a branch of an open issue
b84622d Follows the pattern of changing a title of an issue (in the backend) and coupled with frontend changes allows changing the branch of an open issue. However, no comments are currently posted to the issue when a branch is changed. I'm still not sure about the best way to implement that but it looks like it might require changes in DB (add old_ref and new_ref columns to 'comment' table).
Perhaps it would also make sense to only merge this part for now, and then follow up with a new PL for comments :)