nextcloud/integration_gitlab

Failed to get GitLab notifications

joreiff opened this issue ยท 8 comments

Retrieving GitLab notifications recently fails with the following error:

GitLab API error : Client error: `GET https://gitlab.com/api/v4/todos?action%5B%5D=assigned&action%5B%5D=mentioned&action%5B%5D=build_failed&action%5B%5D=marked&action%5B%5D=approval_required&action%5B%5D=unmergeable&action%5B%5D=directly_addressed&state=pending` resulted in a `400 Bad Request` response: {"error":"action is invalid"}

Reconnecting the account does not solve the problem.

saro commented

Looking in the browser, the end-point /apps/integration_gitlab/todos returns {"error":"Authentication failed"}

As mentioned by @joreiff this doesn't change reconnecting the account with a different token

I have the same problem i think since upgrade to Gitlab 15.5:
GitLab API error : Client error: GET https://gitlab.xxxxx.de/api/v4/todos?action%5B%5D=assigned&action%5B%5D=mentioned&action%5B%5D=build_failed&action%5B%5D=marked&action%5B%5D=approval_required&action%5B%5D=unmergeable&action%5B%5D=directly_addressed&state=pending resulted in a 400 Bad Request response: {"error": "action is invalid"}

Has the api changed in Gitlab 15.5 ?

Gitlab version: 15.5 (version is from yesterday / https://hub.docker.com/r/gitlab/gitlab-ce/tags)
Nextcloud version: 24.06
Plugin version: 1.0.6

I have the same problem i think since upgrade to Gitlab 15.5: GitLab API error : Client error: GET https://gitlab.xxxxx.de/api/v4/todos?action%5B%5D=assigned&action%5B%5D=mentioned&action%5B%5D=build_failed&action%5B%5D=marked&action%5B%5D=approval_required&action%5B%5D=unmergeable&action%5B%5D=directly_addressed&state=pending resulted in a 400 Bad Request response: {"error": "action is invalid"}

Has the api changed in Gitlab 15.5 ?

Gitlab version: 15.5 (version is from yesterday / https://hub.docker.com/r/gitlab/gitlab-ce/tags) Nextcloud version: 24.06 Plugin version: 1.0.6

I have the same problem!

Gitlab version: 15.5
Nextcloud version: 24.06
Plugin version: 1.0.6

GitLab API error : Client error: `GET https://git.XYZ.com/api/v4/todos?action%5B%5D=assigned&action%5B%5D=mentioned&action%5B%5D=build_failed&action%5B%5D=marked&action%5B%5D=approval_required&action%5B%5D=unmergeable&action%5B%5D=directly_addressed&state=pending` resulted in a `400 Bad Request` response: {"error":"action is invalid"}

It looks like Gitlab 15.5 applies extra validation to the API and disallows the use of an incorrect HTTP request.

I've created a pull request to remove the query brackets when requesting the todos using the api,

It looks like Gitlab 15.5 applies extra validation to the API and disallows the use of an incorrect HTTP request.

I've created a pull request to remove the query brackets when requesting the todos using the api

thx! it`s works

I can confirm it works without brackets [].

Furthermore I suggest to leave out the "action" parameter at all since it is

  1. Optional
  2. Lists all values anyway

See: https://docs.gitlab.com/15.5/ee/api/todos.html

@webermax ๐Ÿ‘

Fixed by 15977bd
No more 'action' filter. This will be included in the next release which is coming soon.

@webermax +1

Fixed by 15977bd No more 'action' filter. This will be included in the next release which is coming soon.

...that release is not available for NC 24 latest?