Unverified Commit d56b1467 authored by Austin Horstman's avatar Austin Horstman Committed by GitHub
Browse files

nixpkgs-plugin-update: no token fallback (#471396)

parents e9e1e522 21d41886
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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 = """