-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Issues overview should not show issues from archived repos #13220
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13220 +/- ##
==========================================
- Coverage 41.79% 41.79% -0.01%
==========================================
Files 744 744
Lines 79538 79620 +82
==========================================
+ Hits 33246 33278 +32
- Misses 40818 40860 +42
- Partials 5474 5482 +8
Continue to review full report at Codecov.
|
It seemed like a good idea to me to pull (--rebase) master into this branch, which I did. If it was wrong, I'd rather throw this PR away and start a new one. Sorry about this, I'm still rather new to github. :( |
@eneuschild the best way to update a pull with changes from master is:
this way you dont have to force push <- witch make reviews inconvinient & you dont see all the commits from master here in this branch :) |
@eneuschild if you already messed up ... the best thing is a rebase and force push then
|
the "Update Branch" button on github is doing the same thing - but dont forget to pull to your local repo afterwards before commiting new stuff :) |
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.
@eneuschild the best way to update a pull with changes from master is:
- fetch/pull upstream-master to your local repo
- merge master into your feature branch
git merge --no-ff master
...the "Update Branch" button on github is doing the same thing - but dont forget to pull to your local repo afterwards before commiting new stuff :)
Alrighty, thank you!
b9f1d44
to
355a90f
Compare
…rations closer to their usages
@eneuschild what's the state of this pull? |
Meh, I just realized that I forgot to set my git user name and email when I moved to a new PC a few days ago and now my last few commits are under the name "Gitea". :( Once again, sorry for the confusion. |
I think it's better to use join but not |
oh NO it got a conflict ... |
Neither the first nor the biggest one. :) I'll resolve it. |
The IDs on old codes should be replaced by conditions because ids maybe very hug for a public site. And I would like the new code could avoid to do that again. A condition with join is better than ids. |
Do you mean the IDs in Or are you referring to Can you please clarify what and where? |
Yeah, I mean |
It contains WHERE repo_unit.type IN (1,2,3,4,5,6,7,8) |
🚀 |
* master: (252 commits) Issues overview should not show issues from archived repos (go-gitea#13220) Display SVG files as images instead of text (go-gitea#14101) [skip ci] Updated translations via Crowdin Update docs to clarify issues raised in go-gitea#14272 (go-gitea#14318) [skip ci] Updated translations via Crowdin [Refactor] Passwort Hash/Set (go-gitea#14282) Add option to change username to the admin panel (go-gitea#14229) fix mailIssueCommentBatch for pull request (go-gitea#14252) Remove self from MAINTAINERS (go-gitea#14286) Do not reload page after adding comments in Pull Request reviews (go-gitea#13877) Fix session bug when introduce chi (go-gitea#14287) [skip ci] Updated translations via Crowdin Add secure/httpOnly attributes to the lang cookie (go-gitea#9690) (go-gitea#14279) Some code improvements (go-gitea#14266) [skip ci] Updated translations via Crowdin Fix wrong type on hooktask to convert typ from char(16) to varchar(16) (go-gitea#14148) Upgrade XORM links in documentation. (go-gitea#14265) Check permission for the appropriate unit type (go-gitea#14261) Add compliance check for windows to ensure cross platform build (go-gitea#14260) [skip ci] Updated translations via Crowdin ...
Context
I'd like to fix #13171.
As discussed there, I feel some refactoring is in order in the function
user.Issues()
.Following @zeripath's advice, I'm starting with some comments throughout the function.
Stylistic question
There are 4 routes that call the function
user.Issues()
:/issues
/pulls
/org/{orgID}/issues
/org/{orgID}/pulls
Since the function then painstakingly distinguishes between those four cases, wouldn't it be nicer to have four separate functions as entrypoints, that first do their respective things and then call a (new) function containing the code they have in common?