roll_commenter: Add link to commenting build
Bug: b/369718402
Change-Id: I80b2824ca3857c09df22ecf2391c92b08228b0b2
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/254822
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Taylor Cramer <cramertj@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/recipes/roll_commenter.expected/new_roller.json b/recipes/roll_commenter.expected/new_roller.json
index cf536cf..9a43266 100644
--- a/recipes/roll_commenter.expected/new_roller.json
+++ b/recipes/roll_commenter.expected/new_roller.json
@@ -631,7 +631,7 @@
"-host",
"https://pigweed-review.googlesource.com",
"-input",
- "{\"change_id\": \"1234\", \"input\": {\"message\": \"builder: Successfully rolled into 3 projects\", \"notify\": \"OWNER\", \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"}, \"revision_id\": \"current\"}",
+ "{\"change_id\": \"1234\", \"input\": {\"message\": \"[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects\", \"notify\": \"OWNER\", \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"}, \"revision_id\": \"current\"}",
"-output",
"/path/to/tmp/json"
],
@@ -652,14 +652,14 @@
"timeout": 600,
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_SUMMARY_TEXT@builder: Successfully rolled into 3 projects@@@",
+ "@@@STEP_SUMMARY_TEXT@[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects@@@",
"@@@STEP_LOG_END@json.output (invalid)@@@",
"@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
"@@@STEP_LOG_END@json.output (exception)@@@",
"@@@STEP_LOG_LINE@json.input@{@@@",
"@@@STEP_LOG_LINE@json.input@ \"change_id\": \"1234\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"input\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"message\": \"builder: Successfully rolled into 3 projects\",@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"message\": \"[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"notify\": \"OWNER\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"@@@",
"@@@STEP_LOG_LINE@json.input@ },@@@",
diff --git a/recipes/roll_commenter.expected/one_successful_comment.json b/recipes/roll_commenter.expected/one_successful_comment.json
index e3a8772..6469ab3 100644
--- a/recipes/roll_commenter.expected/one_successful_comment.json
+++ b/recipes/roll_commenter.expected/one_successful_comment.json
@@ -571,7 +571,7 @@
"-host",
"https://pigweed-review.googlesource.com",
"-input",
- "{\"change_id\": \"1234\", \"input\": {\"message\": \"builder: Successfully rolled into 3 projects\", \"notify\": \"OWNER\", \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"}, \"revision_id\": \"current\"}",
+ "{\"change_id\": \"1234\", \"input\": {\"message\": \"[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects\", \"notify\": \"OWNER\", \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"}, \"revision_id\": \"current\"}",
"-output",
"/path/to/tmp/json"
],
@@ -592,14 +592,14 @@
"timeout": 600,
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_SUMMARY_TEXT@builder: Successfully rolled into 3 projects@@@",
+ "@@@STEP_SUMMARY_TEXT@[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects@@@",
"@@@STEP_LOG_END@json.output (invalid)@@@",
"@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
"@@@STEP_LOG_END@json.output (exception)@@@",
"@@@STEP_LOG_LINE@json.input@{@@@",
"@@@STEP_LOG_LINE@json.input@ \"change_id\": \"1234\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"input\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"message\": \"builder: Successfully rolled into 3 projects\",@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"message\": \"[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"notify\": \"OWNER\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"@@@",
"@@@STEP_LOG_LINE@json.input@ },@@@",
diff --git a/recipes/roll_commenter.expected/one_successful_comment_dry_run_suppress.json b/recipes/roll_commenter.expected/one_successful_comment_dry_run_suppress.json
index 55e1df4..c3b2467 100644
--- a/recipes/roll_commenter.expected/one_successful_comment_dry_run_suppress.json
+++ b/recipes/roll_commenter.expected/one_successful_comment_dry_run_suppress.json
@@ -569,7 +569,7 @@
"name": "c000011.comment",
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_SUMMARY_TEXT@builder: Successfully rolled into 3 projects@@@"
+ "@@@STEP_SUMMARY_TEXT@[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects@@@"
]
},
{
diff --git a/recipes/roll_commenter.expected/two_successful_comments.json b/recipes/roll_commenter.expected/two_successful_comments.json
index 05c6d4c..13d13d4 100644
--- a/recipes/roll_commenter.expected/two_successful_comments.json
+++ b/recipes/roll_commenter.expected/two_successful_comments.json
@@ -571,7 +571,7 @@
"-host",
"https://pigweed-review.googlesource.com",
"-input",
- "{\"change_id\": \"1234\", \"input\": {\"message\": \"builder: Successfully rolled into 3 projects\", \"notify\": \"OWNER\", \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"}, \"revision_id\": \"current\"}",
+ "{\"change_id\": \"1234\", \"input\": {\"message\": \"[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects\", \"notify\": \"OWNER\", \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"}, \"revision_id\": \"current\"}",
"-output",
"/path/to/tmp/json"
],
@@ -592,14 +592,14 @@
"timeout": 600,
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_SUMMARY_TEXT@builder: Successfully rolled into 3 projects@@@",
+ "@@@STEP_SUMMARY_TEXT@[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects@@@",
"@@@STEP_LOG_END@json.output (invalid)@@@",
"@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
"@@@STEP_LOG_END@json.output (exception)@@@",
"@@@STEP_LOG_LINE@json.input@{@@@",
"@@@STEP_LOG_LINE@json.input@ \"change_id\": \"1234\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"input\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"message\": \"builder: Successfully rolled into 3 projects\",@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"message\": \"[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"notify\": \"OWNER\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"@@@",
"@@@STEP_LOG_LINE@json.input@ },@@@",
@@ -668,7 +668,7 @@
"-host",
"https://pigweed-review.googlesource.com",
"-input",
- "{\"change_id\": \"1234\", \"input\": {\"message\": \"builder: Successfully rolled into 3 projects\", \"notify\": \"OWNER\", \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"}, \"revision_id\": \"current\"}",
+ "{\"change_id\": \"1234\", \"input\": {\"message\": \"[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects\", \"notify\": \"OWNER\", \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"}, \"revision_id\": \"current\"}",
"-output",
"/path/to/tmp/json"
],
@@ -689,14 +689,14 @@
"timeout": 600,
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_SUMMARY_TEXT@builder: Successfully rolled into 3 projects@@@",
+ "@@@STEP_SUMMARY_TEXT@[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects@@@",
"@@@STEP_LOG_END@json.output (invalid)@@@",
"@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
"@@@STEP_LOG_END@json.output (exception)@@@",
"@@@STEP_LOG_LINE@json.input@{@@@",
"@@@STEP_LOG_LINE@json.input@ \"change_id\": \"1234\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"input\": {@@@",
- "@@@STEP_LOG_LINE@json.input@ \"message\": \"builder: Successfully rolled into 3 projects\",@@@",
+ "@@@STEP_LOG_LINE@json.input@ \"message\": \"[builder](https://cr-buildbucket.appspot.com/build/8945511751514863184): Successfully rolled into 3 projects\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"notify\": \"OWNER\",@@@",
"@@@STEP_LOG_LINE@json.input@ \"tag\": \"autogenerated:project:builder:bbid=8945511751514863184\"@@@",
"@@@STEP_LOG_LINE@json.input@ },@@@",
diff --git a/recipes/roll_commenter.py b/recipes/roll_commenter.py
index dc5bc8c..8a6319a 100644
--- a/recipes/roll_commenter.py
+++ b/recipes/roll_commenter.py
@@ -246,7 +246,8 @@
}
summary = (
- f'{api.buildbucket.build.builder.builder}: '
+ f'[{api.buildbucket.build.builder.builder}]'
+ f'({api.buildbucket.build_url()}): '
f'Successfully rolled into {len(current_rolls)} '
f'project{"" if len(current_rolls) == 1 else "s"}'
)