KonradJanica commented on a change in pull request #16898:
URL: https://github.com/apache/beam/pull/16898#discussion_r813181832



##########
File path: scripts/ci/pr-bot/shared/commentStrings.ts
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export function allChecksPassed(reviewersToNotify: string[]): string {
+  return `All checks have passed: @${reviewersToNotify.join(" ")}`;
+}
+
+export function assignCommitter(committer: string): string {
+  return `R: @${committer} for final approval`;
+}
+
+export function assignReviewer(labelToReviewerMapping: any): string {
+  let commentString =
+    "Assigning reviewers. If you would like to opt out of this review, comment 
`assign to next reviewer`:\n\n";
+
+  for (let label in labelToReviewerMapping) {
+    let reviewer = labelToReviewerMapping[label];
+    if (label == "no-matching-label") {
+      commentString += `R: @${reviewer} added as fallback since no labels 
match configuration\n`;
+    } else {
+      commentString += `R: @${reviewer} for label ${label}.\n`;
+    }
+  }
+
+  commentString += `
+Available commands:
+- \`stop reviewer notifications\` - opt out of the automated review tooling
+- \`remind me after tests pass\` - tag the comment author after tests pass
+- \`waiting on author\` - shift the attention set back to the author (any 
comment or push by the author will return the attention set to the reviewers)`;
+  return commentString;
+}
+
+export function failingChecksCantAssign(): string {
+  return "Checks are failing. Will not request review until checks are 
succeeding. If you'd like to override that behavior, comment `assign set of 
reviewers`\"";

Review comment:
       Is the last double quote supposed to be there? It seems like the message 
will read as below:
   If you'd like to override that behavior, comment `assign set of reviewers`"




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to