Missing test for get_filenames_in_commit with git_reference
#233
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: Label issues | |
| on: | |
| issues: | |
| types: | |
| - opened | |
| - reopened | |
| jobs: | |
| label-issue: | |
| permissions: | |
| issues: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const issue = await github.rest.issues.get({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| }); | |
| const body = issue.data.body || ''; | |
| const osLabels = new Set(); // Use a Set to avoid duplicates | |
| // Parse the "Environment" section, output of `cz version --report` | |
| if (body.includes('Operating System: Darwin')) { | |
| osLabels.add('os: macOS'); | |
| } | |
| if (body.includes('Operating System: Linux')) { | |
| osLabels.add('os: Linux'); | |
| } | |
| if (body.includes('Operating System: Windows')) { | |
| osLabels.add('os: Windows'); | |
| } | |
| await github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['issue-status: needs-triage', ...osLabels], | |
| }); |