Skip to content

Commit

Permalink
Add dashboard link to feedback message
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Forró <[email protected]>
  • Loading branch information
nforro committed Nov 22, 2024
1 parent 01b9b2e commit 62bd9d9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packit_service/worker/handlers/distgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,18 @@ class TagIntoSidetagHandler(
def get_checkers() -> tuple[type[Checker], ...]:
return (PermissionOnDistgit,)

@staticmethod
def get_handler_specific_task_accepted_message(
service_config: ServiceConfig,
) -> str:
dashboard_url = service_config.dashboard_url

return (
"You can check the recent Koji tagging requests "
f"in [Packit dashboard]({dashboard_url}/jobs/koji-tag-requests). "
f"{DistgitAnnouncement.get_comment_footer_with_announcement_if_present()}"
)

def run_for_branch(
self,
package: str,
Expand Down
6 changes: 5 additions & 1 deletion tests/integration/test_pr_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3035,7 +3035,11 @@ def test_koji_build_tag_via_dist_git_pr_comment(pagure_pr_comment_added, all_bra
pr_mock = (
flexmock(target_branch="f40")
.should_receive("comment")
.with_args(f"{TASK_ACCEPTED} ")
.with_args(
"The task was accepted. You can check the recent Koji tagging requests "
"in [Packit dashboard](/jobs/koji-tag-requests). "
f"{DistgitAnnouncement.get_comment_footer_with_announcement_if_present()}",
)
.once()
.mock()
)
Expand Down

0 comments on commit 62bd9d9

Please sign in to comment.