Translate path separators when parsing npm direct imports #648
This file contains 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: 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], | |
}); |