nixpkgs-plugin-update: include GitHub URL in add commits

When adding new plugins, include the GitHub repository URL in the commit
body. This provides immediate context about the source repository without
needing to look up the plugin definition.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman
2025-12-19 22:56:36 -06:00
parent d9ee67300e
commit dedf21dc6a
@@ -640,12 +640,21 @@ class Editor:
autocommit = not args.no_commit
if autocommit:
assert editor.nixpkgs_repo is not None
commit_message = "{drv_name}: init at {version}".format(
drv_name=editor.get_drv_name(plugin.normalized_name),
version=plugin.version,
)
if isinstance(pdesc.repo, RepoGitHub):
github_url = (
f"https://github.com/{pdesc.repo.owner}/{pdesc.repo.repo}"
)
commit_message += f"\n\n{github_url}"
commit(
editor.nixpkgs_repo,
"{drv_name}: init at {version}".format(
drv_name=editor.get_drv_name(plugin.normalized_name),
version=plugin.version,
),
commit_message,
[args.outfile, args.input_file],
)