-
Notifications
You must be signed in to change notification settings - Fork 264
Description
Summary
Restricts the PR Triage Agent to only process PRs opened from forks, as requested.
Change
In Phase 1.2 (Query Open Agent PRs) of pr-triage-agent.md, added an explicit instruction to filter out PRs that originate from branches within the same repository. Only PRs where head.repo.full_name differs from base.repo.full_name (i.e., fork PRs) will be processed.
Modified File
.github/workflows/pr-triage-agent.md— added fork filter instruction to Phase 1.2
Rationale
The triage workflow was processing all agent-created PRs regardless of origin. By limiting it to fork PRs only, same-repository branch PRs (internal development branches) are excluded from automated triage, which makes sense since those are typically managed directly by the team.
Validation
Workflow compiled successfully ✅
Note: .lock.yml file will be regenerated automatically after merge.
🎩 Equipped by Q
- expires on Feb 23, 2026, 9:12 PM UTC
Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download patch artifact
The patch file is available in the agent-artifacts artifact in the workflow run linked above.
To apply the patch locally:
# Download the artifact from the workflow run https://github.com/github/gh-aw/actions/runs/22264383241
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 22264383241 -n agent-artifacts -D /tmp/agent-artifacts-22264383241
# The patch file will be at agent-artifacts/tmp/gh-aw/aw-q-pr-triage-forks-only.patch after download
# Apply the patch
git am /tmp/agent-artifacts-22264383241/aw-q-pr-triage-forks-only.patchShow patch (29 lines)
From e9f5b3bb71cdbbdc3d0d4a865a3c8605afee04e0 Mon Sep 17 00:00:00 2001
From: Copilot <copilot@github.com>
Date: Sat, 21 Feb 2026 21:11:19 +0000
Subject: [PATCH] feat(triage): restrict PR triage to fork PRs only
Filter out PRs from same-repository branches so the triage agent
only processes PRs opened from forks.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
.github/workflows/pr-triage-agent.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/pr-triage-agent.md b/.github/workflows/pr-triage-agent.md
index 62a3b36..4f8dcb9 100644
--- a/.github/workflows/pr-triage-agent.md
+++ b/.github/workflows/pr-triage-agent.md
@@ -70,6 +70,7 @@ Check for existing triage data in shared memory at `/tmp/gh-aw/repo-memory/defau
Use GitHub tools to fetch all open pull requests:
- Filter by: `is:open is:pr author:app/github-copilot`
+- **Fork PRs only**: After fetching, filter to include only PRs where `head.repo.full_name` differs from `base.repo.full_name` (i.e., PRs opened from forks, not from branches within the same repository). Skip any PRs that originate from the same repository.
- Get PR details including:
- Number, title, description, author
- Files changed (count and paths)
--
2.52.0