fix: fix RPC cache when tmp is on different filesystem #884
Workflow file for this run
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: Add label to new issue | |
on: | |
issues: | |
types: [opened] | |
pull_request_target: | |
types: [opened] | |
jobs: | |
label-new-issue: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/github-script@v6 | |
with: | |
script: | | |
const issue = await github.rest.issues.get({ | |
owner: context.issue.owner, | |
repo: context.issue.repo, | |
issue_number: context.issue.number | |
}); | |
const statusLabel = issue.data.labels.find(({ name }) => | |
name.startsWith("status:") | |
); | |
if (statusLabel === undefined) { | |
const isCollaborator = ["OWNER", "MEMBER", "COLLABORATOR"].includes(issue.data.author_association) | |
const label = isCollaborator ? "status:ready" : "status:triaging" | |
await github.rest.issues.addLabels({ | |
owner: context.issue.owner, | |
repo: context.issue.repo, | |
issue_number: context.issue.number, | |
labels: [label] | |
}); | |
} else { | |
console.log(`Issue already has a status: ${statusLabel.name}`); | |
} |