Fork PRs created from the GitHub Copilot app can't enable "Allow edits by maintainers" (`maintainer_can_modify` silently ignored)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- github, github-actions, python
調査の方向性
Start by tracing how the Copilot app provides GH_TOKEN to remote sessions and how the CLI creates fork pull requests with gh pr create. Compare the token permissions and the maintainer_can_modify value during creation and update; the issue does not name source files or tests. Done means fork PRs have maintainer edits enabled by default, or the app clearly reports when its token cannot set the option.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When the Copilot agent opens a PR from the user's fork into an upstream repo (gh pr create --head <user>:<branch>, using the GH_TOKEN the GitHub Copilot app provides), the PR is created with "Allow edits by maintainers" off. Trying to turn it on afterwards with PATCH /repos/{owner}/{repo}/pulls/{n} and maintainer_can_modify=true returns success but leaves the value false. gh pr edit on the same PR fails with Resource not accessible by integration.
The token appears to be a GitHub App user token (X-OAuth-Scopes is empty). My guess is that it lacks the access to the fork that this setting needs, and GitHub drops the field without reporting an error.
Impact: maintainer and bot workflows can't push to these PRs. For example, our /fix:link-cache bot falls back to pushing to refs/pull/<n>/head and fails with ! [remote rejected] HEAD -> refs/pull/12889/head (deny updating a hidden ref).
Affected version
Copilot CLI 1.0.109, run by the GitHub Copilot app in a remote (cloud) session.
Steps to reproduce the behavior
- In a Copilot app session on an upstream repo where you have a fork, have the agent push a branch to the fork and run
gh pr create -R <upstream> --head <user>:<branch> .... Maintainer edits aren't turned off (no--no-maintainer-edit). - Run
gh pr view <n> --json maintainerCanModifyand getfalse. - Run
gh api -X PATCH repos/<upstream>/pulls/<n> -F maintainer_can_modify=true --jq .maintainer_can_modify. It exits 0 and printsfalse. - Example: open-telemetry/opentelemetry.io#12889, which has
maintainerCanModify: false, and its failed bot push in https://github.com/open-telemetry/opentelemetry.io/actions/runs/46047662218
Expected behavior
Fork PRs created by the agent have "Allow edits by maintainers" on, matching gh pr create's default. If the token can't set it, the agent or app reports that instead of failing silently. A setting to choose the default would also help.
Additional context
- I couldn't find a setting for this in the app's
.github/github-app.ymlreference or in the cloud agent customization docs. - Workaround: tick the checkbox by hand on each PR.
- Possibly related: PyGithub/PyGithub#3297 (discussion:
maintainer_can_modifyhas no effect). - Side note: in the same session,
gh issue create -R github/copilot-cliwith the app's token also failed withResource not accessible by integration (createIssue).
- 主要言語
- Python
- スター
- 11.5k
- フォーク
- 2k
- 平均マージ
- 6時間 34分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-cli のほかの issue
-
area:plugins
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/copilot-cli#5567 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationオープンarea:tools
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/copilot-cli#5476 ·
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5340 ·
github/copilot-cli の issue をすべて見る
似ている issue
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
Status: Triage Suggestion
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
collabnix/awesome-mcp-lists#515 ·
メンテナーはふだん 1 日以内に返信
-
Look-ahead bias via resample('1min').interpolate(method='time') in CCIStrategy and ReinforcedQuickieオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信