Skip to content

Instantly share code, notes, and snippets.

@henriqueln7
Created January 12, 2024 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henriqueln7/3c864eb4fb9018edb7f82638720dce29 to your computer and use it in GitHub Desktop.
Save henriqueln7/3c864eb4fb9018edb7f82638720dce29 to your computer and use it in GitHub Desktop.
Script para fechar automaticamente PRs antigos do Github que não foram atualizado desde tal data
# necessita do github-cli instalado
# OBS.: A branch é deletada e um comentário é feito com o fechamento do PR
gh pr list --search "updated:<2023-06-01" --state=open --json number | jq -r '.[].number' | xargs -I {} gh pr close {} -d -c "PR fechado por inatividade"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment