From 3430874d6f67b47f906150ced165506362493202 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Thu, 3 Oct 2024 14:07:22 +0200 Subject: [PATCH] cockpit-lib-update: show the git shortlog in pull request body --- cockpit-lib-update | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cockpit-lib-update b/cockpit-lib-update index 70fa234a82..f6bc10db36 100755 --- a/cockpit-lib-update +++ b/cockpit-lib-update @@ -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" @@ -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)