Skip to content

Commit

Permalink
Fix CI: Not adding compare url in case of tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Enmk committed Jan 29, 2025
1 parent a312c2f commit 351edb1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/ci/pr_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,13 @@ def __init__(
self.base_name = self.repo_full_name
self.head_ref = ref
self.head_name = self.repo_full_name
self.diff_urls.append(
self.compare_url(github_event["before"], self.sha)
)
before_sha = github_event["before"]
# in case of just a tag on exsiting commit, "before_sha" is 0000000000000000000000000000000000000000
# Hence it is a special case and basically nothing changed, there is no need to compose a diff url
if not all(x == '0' for x in before_sha):
self.diff_urls.append(
self.compare_url(before_sha, self.sha)
)
else:
self.number = pull_request["number"]
self.labels = {label["name"] for label in pull_request["labels"]}
Expand Down

0 comments on commit 351edb1

Please sign in to comment.