diff --git a/asfyaml/feature/github/branch_protection.py b/asfyaml/feature/github/branch_protection.py index ec3d907..fe242a1 100644 --- a/asfyaml/feature/github/branch_protection.py +++ b/asfyaml/feature/github/branch_protection.py @@ -36,7 +36,7 @@ def _run_paged_graphql_query( variables = {"endCursor": end_cursor} variables.update(input_variables) - headers, data = self.ghrepo._requester.graphql_query(query, variables) + _headers, data = self.ghrepo._requester.graphql_query(query, variables) result = data["data"]["repository"]["refs"]["nodes"] for rule in result: diff --git a/asfyaml/feature/website_publish.py b/asfyaml/feature/website_publish.py index e9180c1..3ee4c83 100644 --- a/asfyaml/feature/website_publish.py +++ b/asfyaml/feature/website_publish.py @@ -58,7 +58,7 @@ def run(self): # Get optional target hostname: hostname = self.yaml.hostname if "hostname" in self.yaml else None - if hostname and "apache.org" in hostname: + if hostname and hostname.endswith(".apache.org"): if mappings.WS_HOSTNAME_OVERRIDES.get(self.repository.name, "") != hostname: raise Exception( f".asf.yaml: Invalid hostname '{hostname}' - you cannot specify *.apache.org hostnames, they must be inferred!"