Skip to content

Commit 74bcfbd

Browse files
committed
chore(release): include release workflow link in RC comment
1 parent 08ac2c0 commit 74bcfbd

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

tests/tools/private/release/release_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,12 @@ def test_create_rc_success_first_rc(self):
962962
self.assertIn("commit=12345678", call_args[1])
963963

964964
self.mock_gh.post_issue_comment.assert_called_once()
965+
comment_call_args = self.mock_gh.post_issue_comment.call_args[0]
966+
self.assertEqual(comment_call_args[0], 123)
967+
self.assertIn(
968+
"Trigger Release Workflow: [Release Workflow](https://github.com/bazel-contrib/rules_python/actions/workflows/release.yml)",
969+
comment_call_args[1],
970+
)
965971

966972
def test_create_rc_success_next_rc(self):
967973
# Arrange
@@ -993,6 +999,12 @@ def test_create_rc_success_next_rc(self):
993999
self.assertIn("tag=2.0.0-rc1", call_args[1])
9941000

9951001
self.mock_gh.post_issue_comment.assert_called_once()
1002+
comment_call_args = self.mock_gh.post_issue_comment.call_args[0]
1003+
self.assertEqual(comment_call_args[0], 123)
1004+
self.assertIn(
1005+
"Trigger Release Workflow: [Release Workflow](https://github.com/bazel-contrib/rules_python/actions/workflows/release.yml)",
1006+
comment_call_args[1],
1007+
)
9961008

9971009
def test_create_rc_already_tagged(self):
9981010
# Arrange

tools/private/release/create_rc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,14 @@ def cmd_create_rc(args):
100100

101101
tag_url = f"{REPO_URL}/releases/tag/{next_rc}"
102102
bcr_search_url = f"https://github.com/bazelbuild/bazel-central-registry/pulls?q=is%3Apr+rules_python+{version}"
103+
release_workflow_url = f"{REPO_URL}/actions/workflows/release.yml"
103104
comment_body = f"""🚀 **New Release Candidate Tagged!**
104105
105106
Release Candidate **{next_rc}** has been successfully generated and tagged on branch `{branch_name}`.
106107
107108
View Tag: [{next_rc}]({tag_url})
108-
Track BCR Progress: [Search BCR Pull Requests]({bcr_search_url})"""
109+
Track BCR Progress: [Search BCR Pull Requests]({bcr_search_url})
110+
Trigger Release Workflow: [Release Workflow]({release_workflow_url})"""
109111
gh.post_issue_comment(args.issue, comment_body)
110112
print("RC creation completed successfully!")
111113
return 0

0 commit comments

Comments
 (0)