TestWatcher cannot access objects saved in ExtensionContext#Store before they are disposed #316
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: Add label to opened issues | |
| on: | |
| issues: | |
| types: | |
| - opened | |
| permissions: {} | |
| jobs: | |
| label_issues: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| const issue = await github.rest.issues.get({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| }); | |
| const originalLabels = issue.data.labels.map(l => l.name); | |
| const statusLabels = originalLabels.filter(l => l.startsWith("status: ")); | |
| if (statusLabels.length === 0 && !originalLabels.includes("up-for-grabs")) { | |
| github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ["status: new"] | |
| }) | |
| } |