-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Context
The MVP uses a static PR title, description, and label for all managed-file PRs. While this is functional, the PR Manager Copilot agent (defined at PSModule/.github-private/agents/pr-manager.md) could generate richer, context-aware PR metadata by reading the diff and understanding which file sets were synced.
Proposal
Integrate the GitHub Copilot CLI (gh copilot) into the sync workflow to trigger the existing organization-level PR Manager agent after creating a draft PR. The agent would:
- Read the PR diff to understand what files changed.
- Set the PR title using the format
⚙️ [Maintenance]: <descriptive summary>(e.g., "⚙️ [Maintenance]: Update linter settings and custom instructions"). - Write a release-note-style description with context about which file sets were synced, linking back to the source repo.
- Apply the
NoReleaselabel (since Maintenance maps toNoReleasein the agent's change type table).
Implementation notes
- Create a structured prompt template at
scripts/prompts/sync-pr.mdthat provides file-sync-specific context (target repo, type, file sets included, files changed, source repo link). - The script fills template variables at runtime (
{{owner}},{{repo}},{{type}},{{fileSets}},{{fileList}}) and passes the rendered prompt to the agent. - The change type is always
Maintenance— the prompt should instruct the agent not to auto-detect. - The agent is triggered after the draft PR is created and before it is marked as ready for review.
- Exact CLI syntax:
gh copilot agent pr-manager "$renderedPrompt" --repo {owner}/{repo}(may need adjustment based on CLI version).
Dependencies
- MVP distribution mechanism must be in place first (issue [MVP] File distribution service to organization repos #1).
- The PR Manager agent must be available at
PSModule/.github-private/agents/pr-manager.md.
References
- PR Manager agent:
PSModule/.github-private/agents/pr-manager.md
Reactions are currently unavailable