Skip to content

Commit df73b19

Browse files
PR Rollback: Assign to PR Owner and Reviewers
PiperOrigin-RevId: 404085410 Change-Id: I9b1508ea0f6a4c8ff06e022c0dd85fc342755851
1 parent 1f6da31 commit df73b19

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/create_issue.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ module.exports = async ({github, context}) => {
4747
}
4848
const pr_title = pr_resp.data.title;
4949
// Assign to PR owner and reviewers
50-
let assignees = pr_resp.data.assignees;
51-
assignees.push(pr_resp.data.user.login);
50+
const assignees = pr_resp.data.assignees.concat(pr_resp.data.requested_reviewers);
51+
let assignee_logins = assignees.map(x => x.login);
52+
assignee_logins.push(pr_resp.data.user.login);
53+
console.log(assignee_logins);
5254
// Create an new GH Issue and reference the Original PR
5355
const resp = await github.rest.issues.create({
5456
owner,
5557
repo,
56-
assignees,
58+
assignees: assignee_logins,
5759
title: `Issue created for Rollback of PR #${pr_number}: ${pr_title}`,
5860
body: `Merged PR #${pr_number} is rolled back in ${rollback_commit}.
5961
Please follow up with the reviewer and close this issue once its resolved.`

0 commit comments

Comments
 (0)