This commit is contained in:
Maxim Burgerhout 2021-06-23 07:32:31 -04:00 committed by GitHub
commit fa2f091b2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -160,14 +160,16 @@ class GiteaStatusPush(http.ReporterBase):
for sourcestamp in sourcestamps: for sourcestamp in sourcestamps:
sha = sourcestamp['revision'] sha = sourcestamp['revision']
if 'head_sha' in props:
sha = props['head_sha']
repository_owner = None repository_owner = None
if sha is None: if sha is None:
# No special revision for this, so ignore it # No special revision for this, so ignore it
continue continue
# If this is a pull request, send the status to the head repository # If this is a pull request, send the status to the head repository
if 'pr_id' in props: if 'pr_id' in props:
repository_name = props['head_reponame'] repository_name = props['repository_name']
repository_owner = props['head_owner'] repository_owner = props['owner']
elif 'repository_name' in props: elif 'repository_name' in props:
repository_name = props['repository_name'] repository_name = props['repository_name']
else: else: