-
-
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
Fix bug of branch/tag selector in the issue sidebar #32744
Conversation
Didn’t look into it, but why RepoBranchTagSelector is not used here? |
TBH, this selector should be completely removed. I don't see it is useful in modern Gitea. It seems that selector was added in old days when Gitea doesn't have proper Issue/PR support. Anyone is really using that selector? |
It seems that it is used only in this pkace. |
History: Add possibility to record branch or tag information in an issue (#780) It does nothing more than just saving the branch/tag name into database .............. |
I think it is not a selector here, but a hint. |
|
Just some notice: |
After reviewed the history, the feature aims to record which branch/tag happened of this issue. It looks like it maybe useful when reporting a bug. It's incomplete to have filter in issues page. Since Github has no such feature, we commonly record a version, OS, and other things in the issue content. Another alternative feature is label. Users can create labels with the same name as versions and track them with labels. So is this a really necessary feature? Maybe not. |
I think this feature can be merged into development as it is used for developers to track in which branch/tag happened of this issue. |
remove it |
Although I suggested to remove it, actually "how to remove it" should be carefully designed. Since this feature has been there for long time, we are not sure whether it is sure that nobody needs it. If you just remove it completely and drop the column, then what if some 1.23 users come to complain: please give that selector back to me, what could you do? Ideally the removal should be like this:
|
170ff1e
to
410422f
Compare
Two questions. 1.what is shown/managed for issues that do have this information ? Will this break something for those instances that this was previously used one This might not impact how we work... Just trying to collect the information. Multiple LTS feature branches at different branching from MAIN... I guess review comments can mention what branch the chreeypicked fix should be a applied to (or rewritten for). Not sure how 31899 works ATM so I can't comment |
Nobody knows at the momemt, that's why it needs to collect feedbacks. This info is only stored in database and displayed on the UI, no other logic.
For example: just write the branch/tag name in the issue title? then it is still "stored in database" and "displayed on the UI"
It could also use other approaches, eg: labels, milestones, projects to bind an issue to a "feature" |
Or maybe we can migrate the data to the new table in the coming PR. Then I need to support tag |
Why? Have you figured out how end users use that field? Is it certain that the Ref could be used in your PR? |
so if it is only for display purposes then how it is being used presently can be complimented (honestly in my dev setup its only me that does this out of 4 of us :) ). Be it labels or text, yes there are ways to indicate to the wider team what branch to consider or what tag to check the issue again. I am just nervous about what happens to the db etc if this is dropped/removed. |
So in 1.23 we only hide it, and will drop it in next release if it is not used. |
Is this ready to review or merge? |
Few question , will the new feature #31899 block next release if this pr merged? |
This PR's question is: how do you use that branch/tag selector? |
I moved #31899 from v1.23. And I think that will not be a block of this PR. The purpose is different. That PR added a development sidebar section to record which branches/commits/pull requests which resolved/will resolve the issue. But this feature is recording which branch does the issue happen. |
Yes! Our team uses this feature for more than 20 projects with many branches. When your repo has more than 2-3 branches with different stuff (features, refactoring, etc) developing on them, it is a really useful feature to specify a branch in which issue found. |
@didim99 Thank you very much for the feedback, it is valuable. Just have some more questions, could you help us to understand more about "selector"?
|
To avoid "breaking" in 1.23, I reverted the selector with the bug fix and added more comments. Then this PR could be merged, the discussion could be continued ( #32744 (comment) ) to figure out how to improve the branch selector in the future. |
* giteaofficial/main: Fix bug of branch/tag selector in the issue sidebar (go-gitea#32744) Fix lfs migration (go-gitea#32812) Avoid MacOS keychain dialog in integration tests (go-gitea#32813) Update actionlint.yaml Detect whether action view branch was deleted (go-gitea#32764) Add "n commits" link to contributors in contributors graph page (go-gitea#32799) Fix "unicode escape" JS error (go-gitea#32806) use dedicated runners for release artifacts (go-gitea#32811) Make API "compare" accept commit IDs (go-gitea#32801) Implement update branch API (go-gitea#32433) Fix JS error when dropping a file to a editor without dropzone (go-gitea#32804) chore: use errors.New to replace fmt.Errorf with no parameters (go-gitea#32800)
At first, it's a standardized approach to specifying a branch reference. Of course, using issue title/text can be a compromise solution, but it needs additional convention for team members to implement this (especially if we want to use this information for some automated pipelines, parsing a human written text is a terrible thing! At the moment I not sure in possibility to retrieve branch ref via API/webhook, but having a separate field seems better than text). Second, "selector" decreases chance of human-related mistakes such as typo (hello parsing, again). Also current implementation is good enough to handle branch renaming, clicking to branch link in issue list redirect you to actual (renamed) branch. And last (but not least), it's just convenient! You don't need to remember all branch names in repo or go to another page in another tab to find a branch name, just use selector!
Actually, I'm not sure at the moment. I'm using Gitea (thanks, dev team, great work!) in 95% of time rather than Github in last three years. This new feature looks cool, but not sure it suitable to solve our task "specify a (existing) branch on which issue/task should be solved". I need some time to playing with this new approach to answer for your question. Of course, I understand if maintainers decide remove this functionality without any replacement as unmaintanable/legacy/buggy stuff, but if you want to remove this only because "nobody uses this", please, no! P. S. Our team using Gitea as global task tracker (not only for code, for everything), it's lightweight and easy to use, good enough for small team. We tried OpenProject and some other open source solutions, and Gitea's issues system wins. |
Fix: #32731