Created
March 3, 2025 18:45
-
-
Save williambdean/bea337f53ab13546b4d3ca02b4ab5f56 to your computer and use it in GitHub Desktop.
Label PRs from Bots with "no releasenotes"
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
| --- | |
| # See in action with pymc-labs/pymc-marketing: https://github.com/pymc-labs/pymc-marketing/blob/main/.github/workflows/bot-prs.yml | |
| name: Bot PRs | |
| on: | |
| pull_request: | |
| types: [opened] | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| label-no-releasenotes: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Label no releasenotes | |
| run: | | |
| number=${{ github.event.pull_request.number }} | |
| is_bot=$(gh pr view $number --json author --jq '.author.is_bot') | |
| if [[ $is_bot == "true" ]]; then | |
| gh pr edit $number --add-label "no releasenotes" | |
| fi | |
| env: | |
| GH_TOKEN: ${{ github.token }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment