| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
pull_request_target events expose the author on payload.pull_request, not payload.issue. Read that field first and fall back to pulls.get so limit-community-prs no longer calls issues.get and fails with 401.
There was a problem hiding this comment.
Fixes the “Limit community pull requests” workflow failing on pull_request_target by correctly resolving the PR author from context.payload.pull_request (and using the PR API fallback when in a PR context), aligning behavior with the existing DevFlow PR Review workflow.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/scripts/check_team_membership.js | Updates author resolution to support pull_request_target payloads and uses pulls.get fallback for PR contexts. |
| .github/tests/test_check_team_membership.js | Adds tests for author resolution via payload.pull_request and via pulls.get fallback when needed. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Motivation
The Limit community pull requests workflow fails on team_check with 401 Bad credentials when a community PR is opened. The shared check_team_membership.js script looks for the author on payload.issue, but pull_request_target events expose the author on payload.pull_request instead. The script then falls back to issues.get, which fails.
DevFlow PR Review already reads payload.pull_request.user.login and succeeds on the same events.
Changes
Validation plan
After merge:
Fixes the CI failure seen in run https://github.com/microsoft/agent-framework/actions/runs/29404637576