Skip to content

List merge requests using specific approver_ids regression #1698

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

Closed
skycaptain opened this issue Nov 18, 2021 · 9 comments · Fixed by #1699
Closed

List merge requests using specific approver_ids regression #1698

skycaptain opened this issue Nov 18, 2021 · 9 comments · Fixed by #1699

Comments

@skycaptain
Copy link

skycaptain commented Nov 18, 2021

Description of the problem, including code/CLI snippet

There might be a possible regression of #1010 with the latest version. The issue is exactly the same:

group = gl.groups.get(id=475)
group_mrs = group.mergerequests.list(
    all=True,
    state="opened",
    author_id=423,
    approver_ids=[423],
)
[21:49:48] DEBUG    Starting new HTTPS connection (1): *redacted*:443                                connectionpool.py:971
           DEBUG    https://*redacted*:443 "GET /api/v4/user HTTP/1.1" 200 None                      connectionpool.py:452
[21:49:49] DEBUG    https://*redacted*:443 "GET /api/v4/groups/475 HTTP/1.1" 200 None                connectionpool.py:452
           DEBUG    https://*redacted*:443 "GET                                                      connectionpool.py:452
                    /api/v4/groups/475/merge_requests?state=opened&author_id=423&approver_ids=423                          
                    HTTP/1.1" 400 60                                                                                       
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/gitlab/exceptions.py", line 304, in wrapped_f
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/gitlab/mixins.py", line 242, in list
    obj = self.gitlab.http_list(path, **data)
  File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 718, in http_list
    return list(GitlabList(self, url, query_data, **kwargs))
  File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 881, in __init__
    self._query(url, query_data, **self._kwargs)
  File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 891, in _query
    result = self._gl.http_request("get", url, query_data=query_data, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 628, in http_request
    raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 400: approver_ids should be an array, 'None' or 'Any'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "*redacted*.py", line 30, in <module>
    group_mrs = group.mergerequests.list(
  File "/usr/local/lib/python3.9/site-packages/gitlab/exceptions.py", line 306, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabListError: 400: approver_ids should be an array, 'None' or 'Any'

Expected Behavior

Return merge requests for the specified approver_ids.

Actual Behavior

Raises an exception.

Specifications

  • python-gitlab version: 2.10.1
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): 14.2.4-ee
@JohnVillalovos
Copy link
Member

Related issue: #1419

My guess is because there is only one item in the list it doesn't like it.

Likely we need to add support for doing approver_ids[]=423 (which is adding []).

@skycaptain
Copy link
Author

Likely we need to add support for doing approver_ids[]=423 (which is adding []).

Unfortunatly, I havn't found an example on in the Gitlab docs on how to encode the array, but guessing from this post, the URL argument may be approver_ids[]=423 just like you wrote.

My guess is because there is only one item in the list it doesn't like it.

Hmm, having the same issue with two user ids:

group_mrs = group.mergerequests.list(
    all=True,
    state="opened",
    author_id=423,
    approver_ids=[11, 423],
)
[22:37:00] DEBUG    Starting new HTTPS connection (1): *redacted*:443                                connectionpool.py:971
           DEBUG    https://*redacted*:443 "GET /api/v4/user HTTP/1.1" 200 None                      connectionpool.py:452
[22:37:01] DEBUG    https://*redacted*:443 "GET /api/v4/groups/475 HTTP/1.1" 200 None                connectionpool.py:452
           DEBUG    https://*redacted*:443 "GET                                                      connectionpool.py:452
                    /api/v4/groups/475/merge_requests?state=opened&author_id=423&approver_ids=11%2C423                      
                    HTTP/1.1" 400 60  
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/gitlab/exceptions.py", line 304, in wrapped_f
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/gitlab/mixins.py", line 242, in list
    obj = self.gitlab.http_list(path, **data)
  File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 718, in http_list
    return list(GitlabList(self, url, query_data, **kwargs))
  File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 881, in __init__
    self._query(url, query_data, **self._kwargs)
  File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 891, in _query
    result = self._gl.http_request("get", url, query_data=query_data, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 628, in http_request
    raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 400: approver_ids should be an array, 'None' or 'Any'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "*redacted*.py", line 30, in <module>
    group_mrs = group.mergerequests.list(
  File "/usr/local/lib/python3.9/site-packages/gitlab/exceptions.py", line 306, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabListError: 400: approver_ids should be an array, 'None' or 'Any'

@JohnVillalovos
Copy link
Member

Unfortunatly, I havn't found an example on in the Gitlab docs on how to encode the array, but guessing from this post, the URL argument may be approver_ids[]=423 just like you wrote.

https://docs.gitlab.com/ee/api/#array

So if approver_ids=[11, 423]

It is supposed to be something like: approver_ids[]=11&approver_ids[]=423 in the actual HTTP request. Though currently it will also work as approver_ids=11,423 as it understands a comma separated string is a list.

@JohnVillalovos
Copy link
Member

JohnVillalovos commented Nov 18, 2021

I dug into this a bit more:

So to fix this we need to send the arrays in the proper way.

@JohnVillalovos
Copy link
Member

Ah, looks like the comma gets URL-encoded there so that might be related to #1356 and similar. Or, maybe it's meant to be encoded I should probably check first :D

I believe the URL encoding there is correct. I dug into it a bit and it is done by requests.

@JohnVillalovos
Copy link
Member

I have a draft PR that might fix this: #1699

I think it should work for 1 ID in the list but unsure if 2 or more IDs were in the approver_ids list. Not sure how the GitLab server will react to that...

JohnVillalovos added a commit that referenced this issue Nov 20, 2021
1. Create a new CsvStringAttribute class. This is to indicate types
   which are sent to the GitLab server as comma-separated-strings
   (CSV) but we have been allowing users to use a list-of-strings.
   These values are NOT array values, so adding [] to the key name
   breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Nov 20, 2021
1. Create a new CsvStringAttribute class. This is to indicate types
   which are sent to the GitLab server as comma-separated-strings
   (CSV) but we have been allowing users to use a list-of-strings.
   These values are NOT array values, so adding [] to the key name
   breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
@JohnVillalovos
Copy link
Member

@skycaptain #1699 is available which should resolve the issue. In my testing it is working to fix this issue.

@skycaptain
Copy link
Author

@JohnVillalovos works!

@JohnVillalovos
Copy link
Member

JohnVillalovos commented Nov 21, 2021

@JohnVillalovos works!

Awesome. Thank you for testing it @skycaptain !

JohnVillalovos added a commit that referenced this issue Nov 27, 2021
1. Create a new CsvStringAttribute class. This is to indicate types
   which are sent to the GitLab server as comma-separated-strings
   (CSV) but we have been allowing users to use a list-of-strings.
   These values are NOT array values, so adding [] to the key name
   breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Nov 30, 2021
1. Create a new CsvStringAttribute class. This is to indicate types
   which are sent to the GitLab server as comma-separated-strings
   (CSV) but we have been allowing users to use a list-of-strings.
   These values are NOT array values, so adding [] to the key name
   breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 1, 2021
1. Create a new CsvStringAttribute class. This is to indicate types
   which are sent to the GitLab server as comma-separated-strings
   (CSV) but we have been allowing users to use a list-of-strings.
   These values are NOT array values, so adding [] to the key name
   breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 2, 2021
1. Create a new CsvStringAttribute class. This is to indicate types
   which are sent to the GitLab server as comma-separated-strings
   (CSV) but we have been allowing users to use a list-of-strings.
   These values are NOT array values, so adding [] to the key name
   breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 6, 2021
1. Create a new CsvStringAttribute class. This is to indicate types
   which are sent to the GitLab server as comma-separated-strings
   (CSV) but we have been allowing users to use a list-of-strings.
   These values are NOT array values, so adding [] to the key name
   breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 11, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 11, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 13, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 13, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 14, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 16, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 16, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 20, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 24, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Dec 31, 2021
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 3, 2022
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 4, 2022
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 8, 2022
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 13, 2022
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 13, 2022
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 15, 2022
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 15, 2022
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 18, 2022
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 22, 2022
1. Create a new CommaSeparatedListAttribute class. This is to indicate
   types which are sent to the GitLab server as
   comma-separated-strings (CSV) but we have been allowing users to
   use a list-of-strings.  These values are NOT array values, so
   adding [] to the key name breaks them.

2. Rename ListAttribute to ArrayAttribute.

3. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

4. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

Fixes: #1698
JohnVillalovos added a commit that referenced this issue Jan 30, 2022
1. Create a new ArrayAttribute class. This is to indicate
   types which are sent to the GitLab server as
   arrays https://docs.gitlab.com/ee/api/#array

At this stage it is identical to the CommaSeparatedListAttribute class
but will be used later to support the array types sent to GitLab.

Related: #1698
JohnVillalovos added a commit that referenced this issue Jan 30, 2022
Create a new ArrayAttribute class. This is to indicate types which are
sent to the GitLab server as arrays
https://docs.gitlab.com/ee/api/#array

At this stage it is identical to the CommaSeparatedListAttribute class
but will be used later to support the array types sent to GitLab.

This is the second step in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types

Related: #1698
JohnVillalovos added a commit that referenced this issue Feb 1, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Feb 1, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Feb 1, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Feb 12, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Feb 14, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Feb 14, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Mar 10, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Mar 26, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Mar 27, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Jul 24, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Jul 25, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

2. Move processing of most GitlabAttributes into the
   client.py:http_request() method. Now we convert our params into a
   list of tuples so that we can have multiple identical keys but with
   different values.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Jul 25, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Jul 26, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Jul 27, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Jul 27, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value.

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Jul 27, 2022
1. If a value is of type ArrayAttribute then append '[]' to the name
   of the value for query parameters (`params`).

This is step 3 in a series of steps of our goal to add full
support for the GitLab API data types[1]:
  * array
  * hash
  * array of hashes

Step one was: commit 5127b15
Step two was: commit a57334f

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
JohnVillalovos added a commit that referenced this issue Jul 28, 2022
#1698 has been
fixed. Add test to show that.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants