-
Notifications
You must be signed in to change notification settings - Fork 252
Description
Context
We have an agentic workflow that coordinates changes across two private repos (org/repo-a and org/repo-b). The workflow checks out both repos into subdirectories and instructs the agent to implement changes in both, then create a PR for each.
What we tried
steps:
- uses: actions/checkout@v6 # agentic-workflows (workflow repo)
- uses: actions/checkout@v6
with:
repository: org/repo-a
path: repos/repo-a
token: ${{ secrets.CROSS_REPO_PAT }}
- uses: actions/checkout@v6
with:
repository: org/repo-b
path: repos/repo-b
token: ${{ secrets.CROSS_REPO_PAT }}
safe-outputs:
github-token: ${{ secrets.CROSS_REPO_PAT }}
create-pull-request:
max: 2
base-branch: main
allowed-repos: ["org/repo-a", "org/repo-b"]The agent successfully:
- Edits files in
repos/repo-a/andrepos/repo-b/ - Creates branches and commits in each subdirectory repo
- Calls
create_pull_requestwithrepo: "org/repo-a"(and repo-b)
But create_pull_request returns:
No changes to commit - no commits found
Root cause (our understanding)
The safe-outputs MCP server appears to capture patches only from the workspace root .git. When target repos are checked out to subdirectories (repos/repo-a/), the MCP server does not find their commits. The safe_outputs handler job also only checks out a single repo at the workspace root.
What works
A hub-and-spokes pattern: an orchestrator plans, then dispatches a separate repo-issue-worker workflow per repo. Each worker checks out its single target repo at the workspace root — create_pull_request with target-repo works perfectly there.
Questions
- Is there a supported way to create PRs in multiple repos from a single workflow run? The
allowed-reposconfig compiles successfully but does not seem to work at runtime with subdirectory checkouts. - Is the hub-and-spokes pattern (orchestrator + per-repo workers via
dispatch-workflow) the intended approach for multi-repo changes? - Are there plans to support patch capture from non-root git repositories (e.g., by using the
repoparameter to locate the correct.gitdirectory)?
Environment
gh awCLI: v0.50.2- GitHub MCP Server: v0.31.0
- MCP Gateway: v0.1.5