Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/pr-author-org-member.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ jobs:
name: PR author is org member
runs-on: ubuntu-latest
steps:
# Bots conhecidos do GitHub (Dependabot, GitHub Actions, Renovate)
# não são "members" no sentido organizacional — não passam pelo endpoint
# /collaborators/{login}/permission e nem aparecem em ?affiliation=outside.
# São agentes do próprio GitHub, autorizados a abrir PRs com as permissões
# do repo via secrets.GITHUB_TOKEN. Bypass explícito + nominal evita
# reescrever o gate semanticamente: humanos continuam sendo validados
# pela rota normal abaixo.
- name: Bypass para bots do GitHub
if: github.event.pull_request.user.type == 'Bot'
run: |
echo "PR autor ${{ github.event.pull_request.user.login }} é Bot — bypass do gate org-member."
exit 0

- name: Validate author is org member with write access
if: github.event.pull_request.user.type != 'Bot'
env:
AUTHOR: ${{ github.event.pull_request.user.login }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading