Skip to content

Commit

Permalink
Add note about retriggering
Browse files Browse the repository at this point in the history
Fixes #2127
  • Loading branch information
kapr200 committed Sep 24, 2024
1 parent 4507b83 commit 907f60d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packit_service/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"You can retrigger the {job} by adding a comment (`{packit_comment_command_prefix} {command}`) "
"into this {place}."
)

MSG_RETRIGGER_DISTGIT = (
"You can retrigger the {job} by adding a comment (`{packit_comment_command_prefix} {command}`) "
"into any open open pull request in dist-git."
)

COPR_CHROOT_CHANGE_MSG = (
"Settings of a Copr project {owner}/{project} need to be updated, "
"but Packit can't do that when there are previous builds still in progress.\n"
Expand Down
9 changes: 9 additions & 0 deletions packit_service/worker/handlers/distgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
MSG_GET_IN_TOUCH,
MSG_DOWNSTREAM_JOB_ERROR_HEADER,
DEFAULT_RETRY_BACKOFF,
MSG_RETRIGGER_DISTGIT,
RETRY_LIMIT_RELEASE_ARCHIVE_DOWNLOAD_ERROR,
)
from packit_service.models import (
Expand Down Expand Up @@ -491,6 +492,14 @@ def run(self) -> TaskResults:
dist_git_url=self.packit_api.dg.local_project.git_url,
)
body_msg += f"{branch_errors}\n\n"

if self.task_name == TaskName.pull_from_upstream:
body_msg += MSG_RETRIGGER_DISTGIT.format(
job="pull_from_upstream",
packit_comment_command_prefix=self.service_config.comment_command_prefix,
command="pull-from-upstream",
)

self._report_errors_for_each_branch(body_msg)
sync_release_run_model.set_status(status=SyncReleaseStatus.error)
return TaskResults(
Expand Down

0 comments on commit 907f60d

Please sign in to comment.