From dedf21dc6ae82de09995702fa093f0b9eed602d6 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Fri, 19 Dec 2025 13:43:45 -0600 Subject: [PATCH] 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 --- .../src/nixpkgs_plugin_update/__init__.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py index 0874e9e44f00..fdc09bafa2dd 100644 --- a/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py +++ b/pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py @@ -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], )