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
17 changes: 4 additions & 13 deletions .github/workflows/copilot-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,13 @@ permissions:
pull-requests: write

jobs:
debug-event:
runs-on: ubuntu-latest
steps:
- name: Print gate inputs
run: |
echo "action=${{ github.event.action }}"
echo "draft=${{ github.event.pull_request.draft }}"
echo "assoc=${{ github.event.pull_request.author_association }}"
echo "user=${{ github.event.pull_request.user.login }}"
echo "head_repo=${{ github.event.pull_request.head.repo.full_name }}"
echo "base_repo=${{ github.event.pull_request.base.repo.full_name }}"

request-copilot-review:
# Same-repo PRs only. author_association in the pull_request_target payload
# reports CONTRIBUTOR for org members on same-repo branches, so head==base
# is the reliable maintainer signal (it requires push access to the base repo).
if: >-
github.event.pull_request.draft == false &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association)
github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- name: Request Copilot review
Expand Down
Loading