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

Closed
opened 2025-11-02 07:35:02 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @noerw on GitHub (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

Originally created by @noerw on GitHub (Aug 24, 2021). - Gitea version (or commit ref): 1.16.0+dev-109-gd17f555fe ## Description [API docs](https://gitea.com/api/swagger#/notification/notifyReadRepoList) 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
GiteaMirror added the type/bugmodifies/api labels 2025-11-02 07:35:02 -06:00
Author
Owner

@singuliere commented on GitHub (Nov 28, 2021):

@noerw I'm unable to repeat the problem (see https://github.com/go-gitea/gitea/pull/17845 for my attempt to do so). Would you have detailed steps to reproduce the issue?

@singuliere commented on GitHub (Nov 28, 2021): @noerw I'm unable to repeat the problem (see https://github.com/go-gitea/gitea/pull/17845 for my attempt to do so). Would you have detailed steps to reproduce the issue?
Author
Owner

@noerw commented on GitHub (Dec 23, 2021):

As the tests you added pass, this is likely an issue with the go-sdk. Code looks correct though:
5d54a04f8d/gitea/notifications.go (L104-L106)

@noerw commented on GitHub (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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7739