Skip to content

Add sort option recentclose for issues and pulls #34525

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 12 commits into from
May 26, 2025

Conversation

MarkusAmshove
Copy link
Contributor

@MarkusAmshove MarkusAmshove commented May 23, 2025

closes #34171

Adds a new sort option recentclose for issues and pull requests which will return items in a descending order of when they were closed

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 23, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label May 23, 2025
@github-actions github-actions bot added the modifies/api This PR adds API routes or modifies them label May 23, 2025
@MarkusAmshove MarkusAmshove marked this pull request as draft May 23, 2025 09:24
@MarkusAmshove MarkusAmshove marked this pull request as ready for review May 23, 2025 09:30
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 24, 2025
@wxiaoguang
Copy link
Contributor

A lot of unrelated changes to other tests (due to the changed test fixtures)

Is it possible to avoid adding more new fixture items, and just use the existing ones?

@MarkusAmshove
Copy link
Contributor Author

A lot of unrelated changes to other tests (due to the changed test fixtures)

Is it possible to avoid adding more new fixture items, and just use the existing ones?

in the default fixture folder there is no repository with enough pull requests.

Is there a way to create test data isolated for those tests?

@wxiaoguang
Copy link
Contributor

wxiaoguang commented May 25, 2025

Is there a way to create test data isolated for those tests?

What about updating the records in DB when the test needs them? For example: Exec("update ... set is_closed=?, ...", true, ...), then no need to touch existing test fixtures.

@MarkusAmshove
Copy link
Contributor Author

Is there a way to create test data isolated for those tests?

What about updating the records in DB when the test needs them? For example: Exec("update ... set is_closed=?, ...", true, ...), then no need to touch existing test fixtures.

Should be good now :-)

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 26, 2025
@techknowlogick techknowlogick enabled auto-merge (squash) May 26, 2025 16:13
@techknowlogick techknowlogick added type/enhancement An improvement of existing functionality reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels May 26, 2025
@techknowlogick techknowlogick added the backport/v1.24 This PR should be backported to Gitea 1.24 label May 26, 2025
@techknowlogick techknowlogick merged commit 50d9565 into go-gitea:main May 26, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.25.0 milestone May 26, 2025
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request May 26, 2025
closes go-gitea#34171 

Adds a new sort option `recentclose` for issues and pull requests which
will return items in a descending order of when they were closed
@GiteaBot GiteaBot added backport/done All backports for this PR have been created and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels May 26, 2025
techknowlogick pushed a commit that referenced this pull request May 26, 2025
Backport #34525 by @MarkusAmshove

closes #34171 

Adds a new sort option `recentclose` for issues and pull requests which
will return items in a descending order of when they were closed

Co-authored-by: Markus Amshove <scm@amshove.org>
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 27, 2025
* giteaofficial/main:
  Split GetLatestCommitStatus as two functions (go-gitea#34535)
  Don't display error log when .git-blame-ignore-revs doesn't exist (go-gitea#34457)
  Add sort option recentclose for issues and pulls (go-gitea#34525)
  fix: return 201 Created for CreateVariable API responses (go-gitea#34517)
  Actions list (go-gitea#34530)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.24 This PR should be backported to Gitea 1.24 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "recentmerged" sort option for pulls API
5 participants