Finish transition from tox to Nox for current continuous integration checks and weekly tests #1620
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: Label PR | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened, edited] | |
jobs: | |
no-changelog: | |
name: Add no changelog label | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Add no changelog label | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
// Regular expression to match the PR title pattern "Bump * from * to *" | |
const bumpPattern = /^Bump .* from .* to .*/; | |
// Fetch the PR | |
const { data: pullRequest } = await github.rest.pulls.get({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.issue.number, | |
}); | |
if ( | |
pullRequest.title.includes('autoupdate') || | |
pullRequest.title.includes('Minor') || | |
pullRequest.title.includes('Fix typo') || | |
pullRequest.title.includes('Update changelog entries') || | |
pullRequest.title.includes('Update changelog prior to') || | |
pullRequest.title.includes('Update pinned requirements') || | |
pullRequest.title.includes('Update release checklist') || | |
bumpPattern.test(pullRequest.title) | |
) { | |
// If yes, then apply the label "No changelog entry needed" | |
await github.rest.issues.addLabels({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
labels: ['No changelog entry needed'], | |
}); | |
} |