Open gokberkince opened 6 months ago
In some cases in which the LDAP user is blocked from Gitlab, danger gives a decoding error because that state is unsatisfied.
Example User Response:
{ "id": XXX, "username": "xxx.xxx", "name": "XXX XXX", "state": "ldap_blocked", "avatar_url": "https://secure.gravatar.com/avatar/{avatar.id}?s=80&d=identicon", "web_url": "https://gitlab.example.com/xxx.xxx" }
Example Curl:
curl --location 'https://gitlab.example.com/api/v4/projects/{projectId}/merge_requests/{mergeRequestId}' \ --header 'Content-Type: application/json' \ --header 'PRIVATE-TOKEN: {TOKEN}'
Added a case to the user's 'state' enum to decode that state correctly.
case ldapBlocked = "ldap_blocked"
Problem
In some cases in which the LDAP user is blocked from Gitlab, danger gives a decoding error because that state is unsatisfied.
Example User Response:
{ "id": XXX, "username": "xxx.xxx", "name": "XXX XXX", "state": "ldap_blocked", "avatar_url": "https://secure.gravatar.com/avatar/{avatar.id}?s=80&d=identicon", "web_url": "https://gitlab.example.com/xxx.xxx" }
Example Curl:
curl --location 'https://gitlab.example.com/api/v4/projects/{projectId}/merge_requests/{mergeRequestId}' \ --header 'Content-Type: application/json' \ --header 'PRIVATE-TOKEN: {TOKEN}'
Solution
Added a case to the user's 'state' enum to decode that state correctly.
case ldapBlocked = "ldap_blocked"