Skip to content

Commit

Permalink
cockpit-lib-update: show the git shortlog in pull request body
Browse files Browse the repository at this point in the history
  • Loading branch information
jelly committed Oct 3, 2024
1 parent 6dcd813 commit 3430874
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cockpit-lib-update
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def run(context, verbose=False, **kwargs):
subprocess.check_call(['git', 'clone', cockpit_repo_url, clone_dir], cwd=tmpdir)
git_describe = subprocess.check_output(['git', 'describe'], cwd=tmpdir / clone_dir).decode().strip()
git_head = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=tmpdir / clone_dir).decode().strip()
git_shortlog = subprocess.check_output(['git', 'shortlog', f'{cockpit_repo_commit}...').decode().strip()

try:
# when HEAD is not tagged, this looks like "290-9-g4a6d86f5b"
Expand All @@ -81,6 +82,7 @@ def run(context, verbose=False, **kwargs):
title = f"Makefile: Update Cockpit lib to {git_head[:32]}"
branch = task.branch('cockpit-lib', title, pathspec=makefile, **kwargs)
kwargs["title"] = title
kwargs["body"] = git_shortlog
task.pull(branch, **kwargs)


Expand Down

0 comments on commit 3430874

Please sign in to comment.