File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -258,9 +258,13 @@ def __init__(
258258 self .base_name = self .repo_full_name
259259 self .head_ref = ref
260260 self .head_name = self .repo_full_name
261- self .diff_urls .append (
262- self .compare_url (github_event ["before" ], self .sha )
263- )
261+ before_sha = github_event ["before" ]
262+ # in case of just a tag on exsiting commit, "before_sha" is 0000000000000000000000000000000000000000
263+ # Hence it is a special case and basically nothing changed, there is no need to compose a diff url
264+ if not all (x == '0' for x in before_sha ):
265+ self .diff_urls .append (
266+ self .compare_url (before_sha , self .sha )
267+ )
264268 else :
265269 self .number = pull_request ["number" ]
266270 self .labels = {label ["name" ] for label in pull_request ["labels" ]}
You can’t perform that action at this time.
0 commit comments