adds user guide docs #1064
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: PR Labeler | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| jobs: | |
| label: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Apply labels based on changed files | |
| uses: actions/labeler@v5 | |
| with: | |
| sync-labels: true | |
| - name: Add fix label for commits with Fixes tag | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const { data: commits } = await github.rest.pulls.listCommits({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number | |
| }); | |
| const hasFixesTag = commits.some(commit => | |
| commit.commit.message.match(/^Fixes:/m) | |
| ); | |
| if (hasFixesTag) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: ['fix'] | |
| }); | |
| } |