Skip to content

chore(deps): Bump google-closure-compiler from 20230502.0.0 to 20230802.0.0 #2785

chore(deps): Bump google-closure-compiler from 20230502.0.0 to 20230802.0.0

chore(deps): Bump google-closure-compiler from 20230502.0.0 to 20230802.0.0 #2785

name: Assign requested reviewers
# This workflow adds requested reviewers as assignees. If you remove a
# requested reviewer, it will not remove them as an assignee.
#
# See https://github.com/google/blockly/issues/5643 for more
# information on why this was added.
#
# N.B.: Runs with a read-write repo token. Do not check out the
# submitted branch!
on:
pull_request_target:
types: [review_requested]
jobs:
requested-reviewer:
runs-on: ubuntu-latest
steps:
- name: Assign requested reviewer
uses: actions/github-script@v6
with:
script: |
try {
if (context.payload.pull_request === undefined) {
throw new Error("Can't get pull_request payload. " +
'Check a request reviewer event was triggered.');
}
const reviewers = context.payload.pull_request.requested_reviewers;
// Assignees takes in a list of logins rather than the
// reviewer object.
const reviewerNames = reviewers.map(reviewer => reviewer.login);
const {number:issue_number} = context.payload.pull_request;
github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
assignees: reviewerNames
});
} catch (error) {
core.setFailed(error.message);
}