Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit472add7

Browse files
committed
feat(api,cli): add support for changelog generation
1 parentd8b8a0a commit472add7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

‎gitlab/v4/objects/repositories.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,25 @@ def delete_merged_branches(self, **kwargs):
204204
"""
205205
path="/projects/%s/repository/merged_branches"%self.get_id()
206206
self.manager.gitlab.http_delete(path,**kwargs)
207+
208+
@cli.register_custom_action(
209+
"Project",
210+
("version_tag",),
211+
("from","to","date","branch","trailer","file","message"),
212+
)
213+
@exc.on_http_error(exc.GitlabCreateError)
214+
defchangelog(self,data=None,**kwargs):
215+
"""Create a changelog entry in the repository.
216+
217+
Args:
218+
**kwargs: Extra options to send to the server (e.g. sudo)
219+
220+
Raises:
221+
GitlabAuthenticationError: If authentication is not correct
222+
GitlabCreateError: If the server failed to perform the request
223+
"""
224+
path="/projects/%s/repository/changelog"%self.get_id()
225+
226+
# This is here to avoid clashing with the CLI's `--version` flag
227+
228+
self.manager.gitlab.http_post(path,data=data,**kwargs)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp