name: "Assign Review Candidates"
on:
pull_request:
types: [labeled]
jobs:
assign-reviewers:
runs-on: ubuntu-latest
steps:
- name: "Assign NodeJS Review Candidate Team"
if: github.event.label.name == 'nodejs-pr'
uses: rowi1de/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
teams: "nodejs-reviewers-candidates" # only works for GitHub Organisation/Teams
include-draft: false # Draft PRs will be skipped (default: false)
skip-with-manual-reviewers: 10 # Skip this action, if the number of reviewers was already assigned (default: 0)
- name: "Assign App Review Candidate Team"
if: github.event.label.name == 'app-pr'
uses: rowi1de/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
teams: "app-reviewers-candidates" # only works for GitHub Organisation/Teams
include-draft: false # Draft PRs will be skipped (default: false)
skip-with-manual-reviewers: 10 # Skip this action, if the number of reviewers was already assigned (default: 0)
and I've verified that the action is getting called. However, I'm getting the following error when it's run:
Run rowi1de/[email protected]
with:
repo-token: ***
teams: nodejs-reviewers-candidates
include-draft: false
skip-with-manual-reviewers: 10
Adding teams: nodejs-reviewers-candidates, persons:
##[error]Validation Failed: "Could not resolve to a node with the global id of 'MDQ6VGVhbTM3MDM1NzY='."
(node:2794) UnhandledPromiseRejectionWarning: HttpError: Validation Failed: "Could not resolve to a node with the global id of 'MDQ6VGVhbTM3MDM1NzY='."
at /home/runner/work/_actions/rowi1de/auto-assign-review-teams/v1.0.0/lib/index.js:8052:23
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:2794) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2794) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It appears that if I type a non existing team, I don't get any errors. But if I type the team that does exist (which has write access to my repo btw), I get this error. Not sure if this is a bug, or user error. Any pointers would be appreciated. Thanks!