chore(deps): bump the npm_and_yarn group across 1 directory with 3 updates #7059
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Assign requested reviewers | ||
|
Check warning on line 1 in .github/workflows/assign_reviewers.yml
|
||
| # 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 | ||
| if: ${{ github.event.requested_reviewer != null }} | ||
| permissions: | ||
| pull-requests: write | ||
| steps: | ||
| - name: Assign requested reviewer | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| script: | | ||
| try { | ||
| if (context.payload.pull_request === undefined) { | ||
| throw new Error("Can't get pull_request payload. Check that " + | ||
| "a request reviewer event was triggered."); | ||
| } | ||
| const {number: issue_number} = context.payload.pull_request; | ||
| await github.rest.issues.addAssignees({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: issue_number, | ||
| assignees: [context.payload.requested_reviewer.login] | ||
| }); | ||
| } catch (error) { | ||
| core.setFailed(error.message); | ||
| } | ||