From 21d418865b6f092645962010e74d4c65ef75fdbb Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 16 Dec 2025 09:58:46 -0600 Subject: [PATCH] nixpkgs-plugin-update: no token fallback GraphQL endpoint introduced in previous tagging work requires a GITHUB_TOKEN. Fallback to `git ls-remote` when we don't have a token to work with. Signed-off-by: Austin Horstman --- .../src/nixpkgs_plugin_update/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 22373aa4207b..1ddf7f58f17b 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 @@ -288,6 +288,14 @@ class RepoGitHub(Repo): @retry(urllib.error.URLError, tries=4, delay=3, backoff=2) def get_latest_tag(self) -> str | None: try: + if not self.token or self.token == "": + log.info( + "No GitHub token available for %s/%s, using git ls-remote fallback", + self.owner, + self.repo, + ) + return super().get_latest_tag() + # FIXME: This fetches all tags. We need to find a way to check if a tag exists in # an ancestor of the default branch. query = """