-
-
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
Repo Activity: count new issues that were closed #31776
Conversation
Previously, closed issues would not be shown under new issues in the activity tab, even if they were newly created. changes: * Split out newlyCreatedIssues from issuesForActivityStatement to count both currently open and closed issues. * Use a seperate function to count active issues to prevent double-counting issues. Signed-off-by: Timon van der Berg <[email protected]>
last call for merge @go-gitea/technical-oversight-committee |
|
||
func activeIssues(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session { | ||
sess := db.GetEngine(ctx).Where("issue.repo_id = ?", repoID). | ||
And("issue.is_pull = ?", false). |
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 am a bit confused, in the issue it explicitly states:
For PRs, it is basically the same issue.
but they are excluded right now?
So do they have the same problem or not?
Apart from that, LGTM.
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.
You're right, pull requests suffer from the same problem. So this fix is only for part of the problem affecting the issue counts.
However, that is unrelated to this code snippet which is counting issues, and hence should filter out pull requets.
If this PR is approved I will be happy to submit a similar fix for pull requests.
* giteaofficial/main: [skip ci] Updated licenses and gitignores Fix rename branch permission bug (go-gitea#32066) Fix artifact v4 upload above 8MB (go-gitea#31664) [skip ci] Updated translations via Crowdin Add bin to Composer Metadata (go-gitea#32099) Fix wrong last modify time (go-gitea#32102) Fix upload maven pacakge parallelly (go-gitea#31851) Repo Activity: count new issues that were closed (go-gitea#31776) Count typescript files as frontend for labeling (go-gitea#32088) Use camo.Always instead of camo.Allways (go-gitea#32097)
I'm new to go and contributing to gitea, your guidance is much appreciated.
This is meant to solve #13309
Previously, closed issues would not be shown under new issues in the
activity tab, even if they were newly created.
changes:
both currently open and closed issues.
double-counting issues after the above change.
Result is that new issues that have been closed are shown both under "new" and "closed".