You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.
It looks to me that the constructed request url's are incorrect. In the current implementation the keyword owned and all (and starredfor projects) are appended to the url path for projects/groups when using while it should be a boolean attribute. Example:
When using the All, Starred or Owned parameter set in Get-GitlabProject and Get-GitlabGroup, the key/value @{all=$true}, @{starred=$true} or @{owned=$true} should be added respectively to the $GetUrlParameters hashtable instead of appending the keyword to the uri path.
Possible solution is to change the switch statement for the parameter set in Get-GitlabProject and Get-GitlabGroup. For projects it could be:
1. Provide a general summary of the issue in the Title above
Get-GitlabGroup and Get-GitlabProject results in an exception when using -All or -Owned parameters and no groups/projects are returned.
2. Describe Your Environment
3. Expected Behavior
When using switch parameters
-All
or-Owned
, we should get a list of all or owned projects/groups.4.Current Behavior
Example query reproducing the error:
When using the above called url (https://gitlab.mydomain.com/api/v4/projects/owned?archived=false&order_by=created_at&sort=desc&per_page=100) in a browser, it results in:
It looks to me that the constructed request url's are incorrect. In the current implementation the keyword
owned
andall
(andstarred
for projects) are appended to the url path for projects/groups when using while it should be a boolean attribute. Example:Should be:
See also API docs: https://docs.gitlab.com/ee/api/projects.html#list-all-projects.
The same applies to groups.
5. Possible Solution
When using the
All
,Starred
orOwned
parameter set inGet-GitlabProject
andGet-GitlabGroup
, the key/value@{all=$true}
,@{starred=$true}
or@{owned=$true}
should be added respectively to the$GetUrlParameters
hashtable instead of appending the keyword to the uri path.Possible solution is to change the switch statement for the parameter set in
Get-GitlabProject
andGet-GitlabGroup
. For projects it could be:The text was updated successfully, but these errors were encountered: