Skip to content
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

PUT /api/v1/notifications only filters by first provided status value #16796

Closed
noerw opened this issue Aug 24, 2021 · 2 comments
Closed

PUT /api/v1/notifications only filters by first provided status value #16796

noerw opened this issue Aug 24, 2021 · 2 comments
Labels
modifies/api This PR adds API routes or modifies them type/bug

Comments

@noerw
Copy link
Member

noerw commented Aug 24, 2021

  • Gitea version (or commit ref): 1.16.0+dev-109-gd17f555fe

Description

API docs say that the status-types parameter can be an array.
In practice, only the first value I provide is considered for the filter.

The repo-specific endpoint /api/v1/repos/<owner>/<repo>/notifications has this issue as well.

Note: this could also be an issue with the go-sdk, didn't check yet

edit: checking this further, it seems only certain status-types values are accepted for each to-status value. If this is intentional, this needs to be documented

@noerw noerw added type/bug modifies/api This PR adds API routes or modifies them labels Aug 24, 2021
@noerw noerw changed the title PUT /api/v1/notifications PUT /api/v1/notifications only filters by first provided status value Aug 24, 2021
@singuliere
Copy link
Contributor

@noerw I'm unable to repeat the problem (see #17845 for my attempt to do so). Would you have detailed steps to reproduce the issue?

singuliere added a commit to singuliere/gitea that referenced this issue Nov 30, 2021
Verify that multiple status-types are taken into account as expected.

Refs: go-gitea#16796
6543 pushed a commit that referenced this issue Dec 3, 2021
Verify that multiple status-types are taken into account as expected.

Refs: #16796
@noerw
Copy link
Member Author

noerw commented Dec 23, 2021

As the tests you added pass, this is likely an issue with the go-sdk. Code looks correct though:
https://gitea.com/gitea/go-sdk/src/commit/5d54a04f8d9bf7e26ae571689f2f7f6b06050806/gitea/notifications.go#L104-L106

@noerw noerw closed this as completed Dec 23, 2021
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
Verify that multiple status-types are taken into account as expected.

Refs: go-gitea#16796
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/bug
Projects
None yet
Development

No branches or pull requests

2 participants