Skip to content

Commit

Permalink
Pagure reporing updates (#2664)
Browse files Browse the repository at this point in the history
Pagure reporing updates

See commits.

Reviewed-by: Maja Massarini
  • Loading branch information
softwarefactory-project-zuul[bot] authored Nov 29, 2024
2 parents 0f2e9b2 + 99ce2ee commit d509105
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions packit_service/worker/reporting/reporters/pagure.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from ogr.abstract import CommitStatus

from packit_service.constants import CONTACTS_URL
from packit_service.worker.reporting.enums import BaseCommitStatus

from .base import StatusReporter
Expand Down Expand Up @@ -43,13 +44,19 @@ def set_status(

# Required because Pagure API doesn't accept empty url.
if not url:
url = "https://wiki.centos.org/Manuals/ReleaseNotes/CentOSStream"

self.project_with_commit.set_commit_status(
self.commit_sha,
state_to_set,
url,
description,
check_name,
trim=True,
)
url = CONTACTS_URL

if self.pull_request_object:
self.pull_request_object.set_flag(
username=check_name, comment=description, url=url, status=state_to_set
)

else:
self.project_with_commit.set_commit_status(
self.commit_sha,
state_to_set,
url,
description,
check_name,
trim=True,
)

0 comments on commit d509105

Please sign in to comment.