Skip to content

Instantly share code, notes, and snippets.

@williambdean
Created March 3, 2025 18:45
Show Gist options
  • Select an option

  • Save williambdean/bea337f53ab13546b4d3ca02b4ab5f56 to your computer and use it in GitHub Desktop.

Select an option

Save williambdean/bea337f53ab13546b4d3ca02b4ab5f56 to your computer and use it in GitHub Desktop.
Label PRs from Bots with "no releasenotes"
---
# 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