| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
chore: rename `gitlab/__version__.py` to `gitlab/_version.py`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is confusing to have a `gitlab/__version__.py` because we also
create a variable `gitlab.__version__` which can conflict with
`gitlab/__version__.py`.
For example in `gitlab/const.py` we have to know that
`gitlab.__version__` is a module and not the variable due to the
ordering of imports. But in most other usage `gitlab.__version__` is a
version string.
To reduce confusion make the name of the version file
`gitlab/_version.py`.
|
|/
|
|
|
|
| |
Create return type-hints for `RESTObject.get_id()` and
`RESTObject.encoded_id`. Previously was saying they return Any. Be
more precise in saying they can return either: None, str, or int.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Updated a few remaining usages of `self.id` to use `self.encoded_id`
as for the most part we shouldn't be using `self.id`
There are now only a few (4 lines of code) remaining uses of
`self.id`, most of which seem that they should stay that way.
|
|\
| |
| | |
chore(objects): use `self.encoded_id` where could be a string
|
| |
| |
| |
| |
| | |
Updated a few remaining usages of `self.id` to use `self.encoded_id`
where it could be a string value.
|
| |
| |
| | |
Co-authored-by: John Villalovos <john@sodarock.com>
|
|/ |
|
|
|
|
|
|
|
|
|
| |
Return the new object data when calling `SaveMixin.save()`.
Also remove check for `None` value when calling
`self.manager.update()` as that method only returns a dictionary.
Closes: #1081
|
|\
| |
| | |
fix: use url-encoded ID in all paths
|
| |
| |
| |
| |
| |
| | |
utils.EncodedId() has basically the same functionalityy of using
utils._url_encode(). So remove utils._url_encode() as we don't need
it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add EncodedId string class. This class returns a URL-encoded string
but ensures it will only URL-encode it once even if recursively
called.
Also added some functional tests of 'lazy' objects to make sure they
work.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure all usage of the ID in the URL path is encoded. Normally it
isn't an issue as most IDs are integers or strings which don't contain
a slash ('/'). But when the ID is a string with a slash character it
will break things.
Add a test case that shows this fixes wikis issue with subpages which
use the slash character.
Closes: #1079
|
|\ \
| | |
| | | |
fix: members: use new *All objects for *AllManager managers
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change it so that:
GroupMemberAllManager uses GroupMemberAll object
ProjectMemberAllManager uses ProjectMemberAll object
Create GroupMemberAll and ProjectMemberAll objects that do not support
any Mixin type methods. Previously we were using GroupMember and
ProjectMember which support the `save()` and `delete()` methods but
those methods will not work with objects retrieved using the
`/members/all/` API calls.
`list()` API calls: [1]
GET /groups/:id/members/all
GET /projects/:id/members/all
`get()` API calls: [2]
GET /groups/:id/members/all/:user_id
GET /projects/:id/members/all/:user_id
Closes: #1825
Closes: #848
[1] https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members
[2] https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members
|
| |/
|/| |
|
|/
|
|
|
|
|
|
| |
Commit 8da0b758c589f608a6ae4eeb74b3f306609ba36d added the `lazy`
parameter to the services `get()` method but missed then using the
`lazy` parameter when it called `super(...).get(...)`
Closes: #1828
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The URL was missing a 'v' before the version number and thus the page
did not exist.
Previously the URL for python-gitlab 3.0.0 was:
https://python-gitlab.readthedocs.io/en/3.0.0/faq.html#attribute-error-list
Which does not exist.
Change it to:
https://python-gitlab.readthedocs.io/en/v3.0.0/faq.html#attribute-error-list
add the 'v' --------------------------^
|
|
|
|
| |
See https://docs.gitlab.com/ee/api/group_access_tokens.html
|
|\
| |
| | |
chore: add `pprint()` and `pformat()` methods to RESTObject
|
| |
| |
| |
| |
| | |
This is useful in debugging and testing. As can easily print out the
values from an instance in a more human-readable form.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We were using `str.replace()` calls to take care of URL encoding
issues.
Switch them to use our `utils._url_encode()` function which itself uses
`urllib.parse.quote()`
Closes: #1356
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The arguments `should_remove_source_branch` and
`merge_when_pipeline_succeeds` are optional arguments. We should not
be setting any default value for them.
https://docs.gitlab.com/ee/api/merge_requests.html#accept-mr
Closes: #1750
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the CLI we need to make sure the components put into the path
portion of the URL are url-encoded. Otherwise they will be interpreted
as part of the path. For example can specify the project ID as a path,
but in the URL it must be url-encoded or it doesn't work.
Also stop adding the components of the path as query parameters in the
URL.
Closes: #783
Closes: #1498
|
|\ \
| | |
| | | |
fix: change to `http_list` for some ProjectCommit methods
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix the type-hints and use `http_list()` for the ProjectCommits methods:
- diff()
- merge_requests()
- refs()
This will enable using the pagination support we have for lists.
Closes: #1805
Closes: #1231
|
|/
|
|
|
| |
There was a missing comma which meant the strings were concatenated
instead of being two separate strings.
|
| |
|
|
|
|
|
|
|
|
| |
BREAKING-CHANGE: The gitlab CLI will now accept CLI arguments
and environment variables for its global options in addition
to configuration file options. This may change behavior for
some workflows such as running inside GitLab CI and with
certain environment variables configured.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a query returns more than 10,000 records than the following values
are NOT returned:
x.total_pages
x.total
Modify the code to allow no value to be set for these values. If there
is not a value returned the functions will now return None.
Update unit test so no longer `xfail`
https://docs.gitlab.com/ee/user/gitlab_com/index.html#pagination-response-headers
Closes #1686
|
|
|
|
|
|
|
| |
Add and document (some of the) optional parameters that can be done
for a `project.merge_requests.get()`
Closes #1775
|
| |
|
|\
| |
| | |
fix: stop encoding '.' to '%2E'
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Forcing the encoding of '.' to '%2E' causes issues. It also goes
against the RFC:
https://datatracker.ietf.org/doc/html/rfc3986.html#section-2.3
From the RFC:
For consistency, percent-encoded octets in the ranges of ALPHA
(%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E),
underscore (%5F), or tilde (%7E) should not be created by URI
producers...
Closes #1006
Related #1356
Related #1561
BREAKING CHANGE: stop encoding '.' to '%2E'. This could potentially be
a breaking change for users who have incorrectly configured GitLab
servers which don't handle period '.' characters correctly.
|
|/
|
|
|
|
| |
mypy 0.920 now understands the type of
'http.client.HTTPConnection.debuglevel' so we remove the
'type: ignore' comment to make mypy pass
|
|
|
|
|
|
|
| |
There is an optional `squash_option` parameter which can be used when
creating Projects and UserProjects.
Closes #1744
|
|
|
|
|
|
|
|
|
|
|
| |
BREAKING CHANGE: A config file is no longer needed to run
the CLI. python-gitlab will default to https://gitlab.com
with no authentication if there is no config file provided.
python-gitlab will now also only look for configuration
in the provided PYTHON_GITLAB_CFG path, instead of merging
it with user- and system-wide config files. If the
environment variable is defined and the file cannot be
opened, python-gitlab will now explicitly fail.
|
|
|
|
| |
It is not yet available upstream.
|
| |
|
|\
| |
| | |
chore: add get() methods for GetWithoutIdMixin based classes
|
| |
| |
| |
| |
| |
| |
| | |
Add the get() methods for the GetWithoutIdMixin based classes.
Update the tests/meta/test_ensure_type_hints.py tests to check to
ensure that the get methods are defined with the correct return type.
|
|/ |
|
|
|
|
|
|
|
|
| |
Fix pylint error "expression-not-assigned" and remove check from the
disabled list.
And I personally think it is much more readable now and is less lines
of code.
|
|
|
|
|
|
| |
Initial pylint check is added. A LONG list of disabled checks is also
added. In the future we should work through the list and resolve the
errors or disable them on a more granular level.
|
|
|
|
| |
Enable 'warn_redundant_casts'for mypy and resolve one issue.
|
|\
| |
| | |
docs: only use type annotations for documentation
|