Add Search and filter options on the blog pages #567
Workflow file for this run
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: Auto Label Issues and PRs | |
| on: | |
| pull_request_target: | |
| types: [opened] | |
| issues: | |
| types: [opened] | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| add-labels: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Add labels to PR | |
| if: github.event_name == 'pull_request_target' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const prNumber = context.payload.pull_request.number; | |
| await github.rest.issues.addLabels({ | |
| ...context.repo, | |
| issue_number: prNumber, | |
| labels: ["recode"] | |
| }); | |
| console.log(`Added labels [recode] to PR #${prNumber}`); | |
| - name: Add labels to Issue | |
| if: github.event_name == 'issues' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const issueNumber = context.payload.issue.number; | |
| await github.rest.issues.addLabels({ | |
| ...context.repo, | |
| issue_number: issueNumber, | |
| labels: ["recode", "level 1"] | |
| }); | |
| console.log(`Added labels [recode, level 1] to Issue #${issueNumber}`); | |
| - name: Set Issue Type to Bug | |
| if: github.event_name == 'issues' | |
| run: | | |
| ISSUE_NUMBER=${{ github.event.issue.number }} | |
| REPO=${{ github.repository }} | |
| TOKEN=${{ secrets.GITHUB_TOKEN }} | |
| curl --request PATCH \ | |
| --url https://api.github.com/repos/${REPO}/issues/${ISSUE_NUMBER} \ | |
| --header "authorization: token ${TOKEN}" \ | |
| --header "content-type: application/json" \ | |
| --data '{"type":"Bug"}' |