Skip to content

Commit dc382fe

Browse files
committed
chore: bring commit signatures up to date with 12.10
1 parent 9d66cb3 commit dc382fe

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

docs/cli.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Get a specific project commit by its SHA id:
258258
259259
$ gitlab project-commit get --project-id 2 --id a43290c
260260
261-
Get the GPG signature of a signed commit:
261+
Get the signature (e.g. GPG or x509) of a signed commit:
262262

263263
.. code-block:: console
264264

docs/gl_objects/commits.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Get the references the commit has been pushed to (branches and tags)::
8282
commit.refs('tag') # only tags
8383
commit.refs('branch') # only branches
8484

85-
Get the GPG signature of the commit (if the commit was signed)::
85+
Get the signature of the commit (if the commit was signed, e.g. with GPG or x509)::
8686

8787
commit.signature()
8888

gitlab/v4/objects.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2299,7 +2299,7 @@ def revert(self, branch, **kwargs):
22992299
@cli.register_custom_action("ProjectCommit")
23002300
@exc.on_http_error(exc.GitlabGetError)
23012301
def signature(self, **kwargs):
2302-
"""Get the GPG signature of the commit.
2302+
"""Get the signature of the commit.
23032303
23042304
Args:
23052305
**kwargs: Extra options to send to the server (e.g. sudo)
@@ -2309,7 +2309,7 @@ def signature(self, **kwargs):
23092309
GitlabGetError: If the signature could not be retrieved
23102310
23112311
Returns:
2312-
dict: The commit's GPG signature data
2312+
dict: The commit's signature data
23132313
"""
23142314
path = "%s/%s/signature" % (self.manager.path, self.get_id())
23152315
return self.manager.gitlab.http_get(path, **kwargs)

tools/cli_test_v4.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ testcase "revert commit" '
113113
--id "$COMMIT_ID" --branch master
114114
'
115115

116-
# Test commit GPG signature
117-
testcase "attempt to get GPG signature of unsigned commit" '
116+
# Test commit signature
117+
testcase "attempt to get signature of unsigned commit" '
118118
OUTPUT=$(GITLAB project-commit signature --project-id "$PROJECT_ID" \
119119
--id "$COMMIT_ID" 2>&1 || exit 0)
120-
echo "$OUTPUT" | grep -q "404 GPG Signature Not Found"
120+
echo "$OUTPUT" | grep -q "404 Signature Not Found"
121121
'
122122

123123
# Test project labels

tools/python_test_v4.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -500,13 +500,13 @@
500500
# assert commit.refs()
501501
# assert commit.merge_requests()
502502

503-
# commit GPG signature (for unsigned commits)
503+
# commit signature (for unsigned commits)
504504
# TODO: reasonable tests for signed commits?
505505
try:
506506
signature = commit.signature()
507507
except gitlab.GitlabGetError as e:
508508
error_message = e.error_message
509-
assert error_message == "404 GPG Signature Not Found"
509+
assert error_message == "404 Signature Not Found"
510510

511511
# commit comment
512512
commit.comments.create({"note": "This is a commit comment"})

0 commit comments

Comments
 (0)