Skip to content

Network manager cleanup Pt1 #598

Network manager cleanup Pt1

Network manager cleanup Pt1 #598

name: PR autoassignment
on:
pull_request_target:
types: [opened]
jobs:
assign-new-issue:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/github-script@v7
with:
script: |
const externalPrTriager = "kanej";
// Within the Github API PRs are issue objects
const pr = await github.rest.issues.get({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number
});
const isCollaborator = ["OWNER", "MEMBER", "COLLABORATOR"].includes(pr.data.author_association)
if (isCollaborator) {
return
}
await github.rest.issues.addAssignees({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number,
assignees: [externalPrTriager],
});