Update dependency python-gitlab to v4 - autoclosed #122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==3.13.0
->==4.13.0
Release Notes
python-gitlab/python-gitlab (python-gitlab)
v4.13.0
Compare Source
Chore
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (
5c27546
)c3efb37
)Feature
0ee0e02
)v4.12.2
Compare Source
Fix
project.files.head()
method (#3006)When an error occurs, raise
GitlabHeadError
inproject.files.head()
method.Closes: #3004 (
9bf26df
)v4.12.1
Compare Source
Chore
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (
d3da326
)64eed5d
)Fix
fix(ci): do not rely on GitLab.com runner arch variables (#3003) (
c848d12
)fix(files): correctly raise GitlabGetError in get method (
190ec89
)v4.12.0
Compare Source
Chore
chore(deps): update all non-major dependencies (
ae132e7
)chore: update pylint to 3.3.1 and resolve issues (#2997)
pylint 3.3.1 appears to have added "too-many-positional-arguments"
check with a value of 5.
I don't disagree with this, but we have many functions which exceed
this value. We might think about converting some of positional
arguments over to keyword arguments in the future. But that is for
another time.
For now disable the check across the project. (
a0729b8
)chore(deps): update dependency types-setuptools to v75 (
a2ab54c
)chore(deps): update gitlab/gitlab-ee docker tag to v17.4.0-ee.0 (
8601808
)chore(deps): update all non-major dependencies (
10ee58a
)chore(deps): update gitlab/gitlab-ee docker tag to v17.3.2-ee.0 (
5cd1ab2
)Feature
feat(build): build multi-arch images (#2987) (
29f617d
)feat: introduce related_issues to merge requests (#2996) (
174d992
)Fix
fix(api): head requests for projectfilemanager (#2977)
fix(api): head requests for projectfilemanager
Co-authored-by: Patrick Evans <[email protected]>
Co-authored-by: Nejc Habjan <[email protected]> (
96a18b0
)v4.11.1
Compare Source
Fix
b41b2de
)v4.11.0
Compare Source
Chore
chore(pre-commit): add deps (
fe5e608
)chore(deps): update all non-major dependencies (
fac8bf9
)chore(deps): update dependency types-setuptools to v74 (
bdfaddb
)chore(deps): update all non-major dependencies (
88c7529
)Documentation
b9f5c12
)Feature
feat(client): make retries configurable in GraphQL (
145870e
)feat(client): add retry handling to GraphQL client (
8898c38
)feat(api): add exclusive GET attrs for /projects/:id/members (
e637808
)feat: add a minimal GraphQL client (
d6b1b0a
)feat(api): add exclusive GET attrs for /groups/:id/members (
d44ddd2
)Refactor
3235c48
)v4.10.0
Compare Source
Chore
chore(release): track tags for renovate (
d600444
)chore(deps): update python-semantic-release/upload-to-gh-release digest to
17c75b7
(12caaa4
)chore(deps): update dependency types-setuptools to v73 (
d55c045
)chore(deps): update all non-major dependencies (
2ade0d9
)chore(deps): update gitlab/gitlab-ee docker tag to v17.3.1-ee.0 (
3fdd130
)chore(deps): update all non-major dependencies (
0578bf0
)chore(deps): update gitlab/gitlab-ee docker tag to v17.3.0-ee.0 (
e5a46f5
)chore(deps): update dependency myst-parser to v4 (
930d4a2
)chore(deps): update dependency sphinx to v8 (
cb65ffb
)chore(deps): update gitlab/gitlab-ee docker tag to v17.2.2-ee.0 (
b2275f7
)chore(deps): update all non-major dependencies (
31786a6
)Documentation
There is an example about object attributes in the FAQ. It shows how to
properly fetch all attributes of all projects, by using list() followed
by a get(id) call.
Unfortunately this example used a wrong variable name, which caused it
not to work and which could have made it slightly confusing to readers.
This commit fixes that, by changing the variable name.
Now the example uses one variable for two Python objects. As they
correspond to the same GitLab object and the intended behavior is to
obtain that very object, just with all attributes, this is fine and is
probably what readers will find most useful in this context. (
43a16ac
)Feature
Add the ability to trigger tests of project and group hooks.
Fixes #2924 (
9353f54
)Test
Before we allowed a maximum of around 15 seconds for the
project-export. Often times the CI was failing with this value.
Change it to a maximum of around 30 seconds. (
bdc155b
)v4.9.0
Compare Source
Chore
chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v38 (
f13968b
)chore(deps): update all non-major dependencies (
f95ca26
)chore(deps): update dependency types-setuptools to v71 (
d6a7dba
)chore(deps): update python-semantic-release/upload-to-gh-release digest to
0dcddac
(eb5c6f7
)chore(deps): update gitlab/gitlab-ee docker tag to v17.2.1-ee.0 (
d13a656
)chore(deps): update all non-major dependencies (
7adc86b
)chore(deps): update python-semantic-release/upload-to-gh-release digest to
e2355e1
(eb18552
)chore(deps): update all non-major dependencies (
e820db0
)chore(ci): make pre-commit check happy
pre-commit incorrectly wants double back-quotes inside the code
section. Rather than fight it, just use single quotes. (
67370d8
)Feature
64ae61e
)v4.8.0
Compare Source
Chore
chore(deps): update gitlab/gitlab-ee docker tag to v17.1.2-ee.0 (
6fedfa5
)chore(deps): update all non-major dependencies (
4a2b213
)chore(ci): specify name of "stale" label
Saw the following error in the log:
[#2618] Removing the label "Stale" from this issue...
##[error][#2618] Error when removing the label: "Label does not exist"
My theory is that the case doesn't match ("Stale" != "stale") and that
is why it failed. Our label is "stale" so update this to match.
Thought of changing the label name on GitHub but then would also
require a change here to the "any-of-labels". So it seemed simpler to
just change it here.
It is confusing though that it detected the label "stale", but then
couldn't delete it. (
44f62c4
)If a
stale
label is manually applied, allow the issue or PR to beclosed by the stale job.
Previously it would require the
stale
label and to also have one of'need info' or 'Waiting for response' labels added. (
2ab88b2
)chore(ci): use codecov token when available (
b74a6fb
)chore(deps): update python-semantic-release/upload-to-gh-release digest to
fe6cc89
(3f3ad80
)chore(deps): update all non-major dependencies (
0f59069
)chore: add
show_caller
argument toutils.warn()
This allows us to not add the caller's location to the UserWarning
message. (
7d04315
)chore: use correct type-hint for
die()
(9358640
)chore(deps): update gitlab/gitlab-ee docker tag to v17.1.1-ee.0 (
5e98510
)chore(deps): update python-semantic-release/upload-to-gh-release digest to
c7c3b69
(23393fa
)chore(deps): update all non-major dependencies (
cf87226
)Documentation
sudo
if modifying an objectAdd a warning about using
sudo
when saving.Give an example of how to
get
an object, modify it, and thensave
it using
sudo
Closes: #532 (
d509da6
)filter
for updatingAdd a note about using
filter
when updating a variable.Closes: #2835
Closes: #1387
Closes: #1125 (
c378817
)Feature
feat(api): add support for project cluster agents (
32dbc6f
)feat(api): add support for container registry protection rules (
6d31649
)feat(api): add support for package protection rules (
6b37811
)feat(api): add support for commit sequence (
1f97be2
)Fix
closed_by()/related_merge_requests()
usehttp_list
The
closed_by()
andrelated_merge_requests()
API calls returnlists. So use the
http_list()
method.This will also warn the user if only a subset of the data is returned. (
de2e4dd
)participants()
method usehttp_list()
Previously it was using
http_get()
but theparticipants
APIreturns a list of participants. Also by using this then we will warn
if only a subset of the participants are returned.
Closes: #2913 (
d065275
)None
Co-authored-by: Nejc Habjan <[email protected]> (
51d8f88
)ref
parameter optional in get raw file apiThe
ref
parameter was made optional in gitlab v13.11.0. (00640ac
)list
does not return all entriesPreviously in the CLI, calls to
list()
would haveget_all=False
bydefault. Therefore hiding the fact that not all items are being
returned if there were more than 20 items.
Added
--no-get-all
option tolist
actions. Along with the alreadyexisting
--get-all
.Closes: #2900 (
e5a4379
)Refactor
c307dd2
)Test
test(registry): disable functional tests for unavailable endpoints (
ee393a1
)test(files): test with and without
ref
parameter in test case (f316b46
)test(files): omit optional
ref
parameter in test case (9cb3396
)test(fixtures): remove deprecated config option (
2156949
)v4.7.0
Compare Source
Chore
chore(deps): update all non-major dependencies (
88de2f0
)chore(deps): update all non-major dependencies (
a510f43
)chore(deps): update gitlab/gitlab-ee docker tag to v17.0.2-ee.0 (
51779c6
)chore(deps): update python-semantic-release/upload-to-gh-release digest to
6b7558f
(fd0f0b0
)chore(deps): update all non-major dependencies (
d4fdf90
)chore(deps): update dependency types-setuptools to v70 (
7767514
)chore(deps): update gitlab/gitlab-ee docker tag to v17.0.1-ee.0 (
df0ff4c
)chore(deps): update python-semantic-release/upload-to-gh-release digest to
477a404
(02a551d
)chore(deps): update all non-major dependencies (
d5de288
)chore: add a help message for
gitlab project-key enable
Add some help text for
gitlab project-key enable
. This both addshelp text and shows how to use the new
help
feature.Example:
$ gitlab project-key --help
usage: gitlab project-key [-h] {list,get,create,update,delete,enable} ...
options:
-h, --help show this help message and exit
action:
{list,get,create,update,delete,enable}
Action to execute on the GitLab resource.
list List the GitLab resources
get Get a GitLab resource
create Create a GitLab resource
update Update a GitLab resource
delete Delete a GitLab resource
enable Enable a deploy key for the project (
1291dbb
)Sort the list of CLI behavior-related args that are to be removed. (
9b4b0ef
)Feature
feat(api): add support for latest pipeline (
635f5a7
)feat: add
--no-mask-credentials
CLI argumentThis gives the ability to not mask credentials when using the
--debug
argument. (18aa1fc
)Fix
Now when registering a custom_action can add help text if desired.
Also delete the VerticalHelpFormatter as no longer needed. When the
help value is set to
None
or some other value, the actions will getprinted vertically. Before when the help value was not set the actions
would all get put onto one line. (
9acd2d2
)v4.6.0
Compare Source
Chore
chore(deps): update python-semantic-release/upload-to-gh-release digest to
673709c
(1b550ac
)chore(deps): update all non-major dependencies (
4c7014c
)chore: update commit reference in git-blame-ignore-revs (
d0fd5ad
)chore(cli): add ability to not add
_id_attr
as an argumentIn some cases we don't want to have
_id_attr
as an argument.Add ability to have it not be added as an argument. (
2037352
)chore: create a CustomAction dataclass (
61d8679
)chore: add an initial .git-blame-ignore-revs
This adds the
.git-blame-ignore-revs
file which allows ignoringcertain commits when doing a
git blame --ignore-revs
Ignore the commit that requires keyword arguments for
register_custom_action()
https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view (
74db84c
)This makes it more obvious when reading the code what each argument is
for. (
7270523
)We no longer support Python versions before 3.8. So it isn't needed
anymore. (
d569128
)chore(deps): update dependency requests to v2.32.0 [security] (
1bc788c
)chore(deps): update all non-major dependencies (
ba1eec4
)chore(deps): update gitlab/gitlab-ee docker tag to v17 (
5070d07
)chore(cli): on the CLI help show the API endpoint of resources
This makes it easier for people to map CLI command names to the API.
Looks like this:
$ gitlab --help
<snip>
The GitLab resource to manipulate.
application API endpoint: /applications
application-appearance
API endpoint: /application/appearance
application-settings
API endpoint: /application/settings
application-statistics
API endpoint: /application/statistics
<snip> (
f1ef565
)Add help for the following standard operations:
For example:
$ gitlab project-key --help
usage: gitlab project-key [-h] {list,get,create,update,delete,enable} ...
options:
-h, --help show this help message and exit
action:
list
get
create
update
delete
enable
Action to execute on the GitLab resource.
list List the GitLab resources
get Get a GitLab resource
create Create a GitLab resource
update Update a GitLab resource
delete Delete a GitLab resource (
5a4a940
)job.trace()
Closes: #2808 (
840572e
)Closes: #2821 (
62fa271
)Feature
Co-authored-by: Cristiano Casella <[email protected]>
Co-authored-by: Nejc Habjan <[email protected]> (
623dac9
)Co-authored-by: Nejc Habjan <[email protected]> (
b187dea
)I don't think commit
a2b8c8c
went far enough to enable usernamessupport. We create and edit a lot of approval rules based on an external
service (similar to CODE_OWNERS), but only have the usernames available,
and currently, have to look up each user to get their user ID to populate
user_ids for .set_approvers() calls. Would very much like to skip the
lookup and just send the usernames, which this change should allow.
See: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule
Signed-off-by: Jarod Wilson <[email protected]> (
12d195a
)Fix
Update the minimum versions of the dependencies in the pyproject.toml
file.
This is related to PR #2878 (
37b5a70
)--id
when enabling a deploy keyNo longer require
--id
when doing:gitlab project-key enable
Now only the --project-id and --key-id are required. (
98fc578
)fix: don't raise
RedirectError
for redirectedHEAD
requests (8fc13b9
)fix: handle large number of approval rules
Use
iterator=True
when going through the list of current approvalrules. This allows it to handle more than the default of 20 approval
rules.
Closes: #2825 (
ef8f0e1
)Signed-off-by: Adrian DC <[email protected]> (
33fbc14
)v4.5.0
Compare Source
Build
This would not leave cache files in the built docker image.
Additionally, also only build the wheel in the build phase.
On my machine, before this PR, size is
7484539
; after this PR, size is7261771
. (4ef94c8
)Chore
chore(deps): update all non-major dependencies (
4f338ae
)chore(deps): update gitlab/gitlab-ee docker tag to v16.11.2-ee.0 (
9be48f0
)chore(deps): update dependency myst-parser to v3 (
9289189
)chore(deps): update all non-major dependencies (
65d0e65
)chore(deps): update dependency jinja2 to v3.1.4 [security] (
8ea10c3
)chore(deps): update all non-major dependencies (
1f0343c
)chore(deps): update gitlab/gitlab-ee docker tag to v16.11.1-ee.0 (
1ed8d6c
)chore(deps): update all non-major dependencies (
0e9f4da
)chore(deps): update gitlab/gitlab-ee docker tag to v16 (
ea8c4c2
)chore(deps): update all non-major dependencies (
d5b5fb0
)chore(deps): update dependency pytest-cov to v5 (
db32000
)chore: update
mypy
to 1.9.0 and resolve one issuemypy 1.9.0 flagged one issue in the code. Resolve the issue. Current
unit tests already check that a
None
value returnstext/plain
. Sofunction is still working as expected. (
dd00bfc
)chore(deps): update dependency black to v24.3.0 [security] (
f6e8692
)chore(deps): update all non-major dependencies (
14a3ffe
)chore(deps): update all non-major dependencies (
3c4dcca
)chore(deps): update all non-major dependencies (
04c569a
)chore: add tox
labels
to enable running groups of environmentstox now has a feature of
labels
which allows running groups ofenvironments using the command
tox -m LABEL_NAME
. For exampletox -m lint
which has been setup to run the linters.Bumped the minimum required version of tox to be 4.0, which was
released over a year ago. (
d7235c7
)Even though there isn't a Python 3.13 at this time, this is done for
the future. tox is already configured to just warn about missing
Python versions, but not fail if they don't exist. (
679ddc7
)chore(deps): update python-semantic-release/python-semantic-release action to v9 (
e11d889
)chore(deps): update all non-major dependencies (
3c4b27e
)chore(deps): update dependency furo to v2024 (
f6fd02d
)chore(deps): update dependency pytest to v8 (
253babb
)chore(deps): update dependency pytest-docker to v3 (
35d2aec
)chore: update version of
black
forpre-commit
The version of
black
needs to be updated to be in sync with what isin
requirements-lint.txt
(3501716
)chore(deps): update all non-major dependencies (
7dc2fa6
)chore(deps): update codecov/codecov-action action to v4 (
d2be1f7
)chore: adapt style for black v24 (
4e68d32
)chore(deps): update dependency black to v24 (
f59aee3
)chore(deps): update all non-major dependencies (
48726fd
)Documentation
We have received multiple issues lately about this. Add it to the FAQ. (
683ce72
)docs(README): tweak GitLab CI usage docs (
d9aaa99
)docs: how to run smoke tests
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (
2d1f487
)To correctly format a code block have to use
::
(57dfd17
)Rotate token returns a dict. Change example to print the entire dict.
Closes: #2836 (
c53e695
)Ref: #2823 (
6d4bffb
)c631eeb
)Feature
feat(job_token_scope): support Groups in job token allowlist API (#2816)
feat(job_token_scope): support job token access allowlist API
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
l.dwp.gov.uk>
Co-authored-by: Nejc Habjan <[email protected]> (
2d1b749
)feat(cli): allow skipping initial auth calls (
001e596
)feat(api): allow updating protected branches (#2771)
feat(api): allow updating protected branches
Closes #2390 (
a867c48
)Fix
scope
an ArrayAttribute in PipelineJobManagerList query params like 'scope' were not being handled correctly for
pipeline/jobs endpoint.
This change ensures multiple values are appended with '[]', resulting in
the correct URL structure.
Signed-off-by: Guilherme Gallo <[email protected]>
Background:
If one queries for pipeline jobs with
scope=[&#​34;failed&#​34;, &#​34;success&#​34;]
One gets:
GET /api/v4/projects/176/pipelines/1113028/jobs?scope=success&scope=failed
But it is supposed to get:
GET /api/v4/projects/176/pipelines/1113028/jobs?scope[]=success&scope[]=failed
The current version only considers the last element of the list argument.
Signed-off-by: Guilherme Gallo <[email protected]> (
c5d0404
)The original bug was that the merge request identifier was used instead of the
approval rule identifier. The test didn't notice that because it used
1
forall identifiers. Make these identifiers different so that a mixup will become
apparent. (
c23e6bd
)Closes #2548 (
b8b3849
)Previously would only go to the 2nd level of the stack for determining
the offending filename and line number. When it should be showing the
first filename outside of the python-gitlab source code. As we want it
to show the warning for the user of the libraries code.
Update test to show it works as expected. (
529f1fa
)fix(api): update manual job status when playing it (
9440a32
)fix(cli): allow exclusive arguments as optional (#2770)
fix(cli): allow exclusive arguments as optional
The CLI takes its arguments from the RequiredOptional, which has three fields: required, optional, and exclusive. In practice, the exclusive options are not defined as either required or optional, and would not be allowed in the CLI. This changes that, so that exclusive options are also added to the argument parser.
fix(cli): inform argument parser that options are mutually exclusive
fix(cli): use correct exclusive options, add unit test
Closes #2769 (
7ec3189
)Test
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (
48a6705
)Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (
06266ea
)make sure we're not awaiting on Gitlab Async functions
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (
4bef473
)test(functional): enable bulk import feature flag before test (
b81da2e
)test: don't use weak passwords
Newer versions of GitLab will refuse to create a user with a weak
password. In order for us to move to a newer GitLab version in testing
use a stronger password for the tests that create a user. (
c64d126
)Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (
f8283ae
)ee013fe
)v4.4.0
Compare Source
Chore
chore(deps): update all non-major dependencies (
550f935
)chore(deps): update pre-commit hook pycqa/flake8 to v7 (
9a199b6
)chore(deps): update dependency jinja2 to v3.1.3 [security] (
880913b
)chore(deps): update dependency flake8 to v7 (
20243c5
)chore(deps): update all non-major dependencies (
cbc13a6
)chore(ci): align upload and download action versions (
dcca59d
)chore(deps): update actions/upload-artifact action to v4 (
7114af3
)chore(ci): add Python 3.13 development CI job
Add a job to test the development versions of Python 3.13. (
ff0c11b
)369a595
)Feature
Those changes implements 'GET /projects/:id/merge_requests/:merge_request_iid/reviewers' gitlab API call.
Naming for call is not reviewers because reviewers atribute already presen in merge request response (
adbd90c
)feat(api): support access token rotate API (
b13971d
)feat(api): support single resource access token get API (
dae9e52
)Fix
@
notationSupport binary files being used in the CLI with arguments using the
@
notation. For example--avatar @​/path/to/avatar.png
Also explicitly catch the common OSError exception, which is the
parent exception for things like: FileNotFoundError, PermissionError
and more exceptions.
Remove the bare exception handling. We would rather have the full
traceback of any exceptions that we don't know about and add them
later if needed.
Closes: #2752 (
57749d4
)v4.3.0
Compare Source
Chore
chore(deps): update all non-major dependencies (
d7bdb02
)chore(deps): update actions/stale action to v9 (
c01988b
)chore(deps): update all non-major dependencies (
9e067e5
)chore(deps): update actions/setup-python action to v5 (
fad1441
)chore(deps): update all non-major dependencies (
bb2af7b
)chore(deps): update all non-major dependencies (
5ef1b4a
)chore(deps): update dependency types-setuptools to v69 (
de11192
)Documentation
2b6da6e
)Feature
feat(api): add support for the Draft notes API (#2728)
feat(api): add support for the Draft notes API
fix(client): handle empty 204 reponses in PUT requests (
ebf9d82
)Fix
Add a
--no-ssl-verify
option to disable SSL verificationCloses: #2714 (
3fe9fa6
)v4.2.0
Compare Source
Chore
chore(deps): update all non-major dependencies (
8aeb853
)chore(deps): update dessant/lock-threads action to v5 (
f4ce867
)chore(deps): update all non-major dependencies (
9fe2335
)chore(deps): update all non-major dependencies (
91e66e9
)chore(deps): update all non-major dependencies (
d0546e0
)Feature
https://docs.gitlab.com/ee/api/pipelines.html (
4954bbc
)Added UploadMixin in mixin module
Added UploadMixin dependency for Project, ProjectWiki, GroupWiki
Added api tests for wiki upload
Added unit test for mixin
Added docs sections to wikis.rst (
7b864b8
)v4.1.1
Compare Source
Chore
chore(ci): add release id to workflow step (
9270e10
)chore(deps): update all non-major dependencies (
32954fb
)Documentation
The examples which show usage of new runner registration api endpoint
are missing commas. This change adds the missing commas. (
b1b2edf
)Fix
b928639
)v4.1.0
Compare Source
Chore
chore(deps): update all non-major dependencies (
bf68485
)chore(CHANGELOG): re-add v4.0.0 changes using old format (
258a751
)chore(CHANGELOG): revert python-semantic-release format change (
b5517e0
)chore: add source label to container image (
7b19278
)chore(
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.