-
-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
push-to-fork
won't push to sibling repos in the same network
#2412
Comments
Proof-of-concept fix in #2414. |
peter-evans
pushed a commit
that referenced
this issue
Sep 29, 2023
peter-evans
pushed a commit
that referenced
this issue
Sep 29, 2023
I've added this change to the v6 release candidate. You can use it like this: - uses: peter-evans/create-pull-request@v6-rc I'll be releasing |
peter-evans
pushed a commit
that referenced
this issue
Nov 30, 2023
peter-evans
pushed a commit
that referenced
this issue
Dec 19, 2023
peter-evans
pushed a commit
that referenced
this issue
Dec 27, 2023
peter-evans
pushed a commit
that referenced
this issue
Jan 31, 2024
Merged
peter-evans
added a commit
that referenced
this issue
Jan 31, 2024
* feat: update author and committer input defaults * Update github-actions[bot] * Update author to new email format * feat: optional input for git ops token * feat: allow push-to-fork to push to sibling repos (#2414) Fixes #2412. * build: update dist * feat: update action runtime to node 20 (#2340) * feat: add truncate warning to pull request body * perf: unshallow only when necessary * fix: remove the remote for the fork on completion * feat: infer github server and api urls * test: integration test fixes * build: bump major version * docs: update to v6 --------- Co-authored-by: Teko <[email protected]> Co-authored-by: Benjamin Gilbert <[email protected]>
I've now released |
aleksandrychev
pushed a commit
to aleksandrychev/create-pull-request
that referenced
this issue
Mar 4, 2024
* feat: update author and committer input defaults * Update github-actions[bot] * Update author to new email format * feat: optional input for git ops token * feat: allow push-to-fork to push to sibling repos (peter-evans#2414) Fixes peter-evans#2412. * build: update dist * feat: update action runtime to node 20 (peter-evans#2340) * feat: add truncate warning to pull request body * perf: unshallow only when necessary * fix: remove the remote for the fork on completion * feat: infer github server and api urls * test: integration test fixes * build: bump major version * docs: update to v6 --------- Co-authored-by: Teko <[email protected]> Co-authored-by: Benjamin Gilbert <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Subject of the issue
Consider a setup where a repo
upstream/repo
has a workfloww
that creates PRs toupstream/repo
, butw
should run without write access toupstream/repo
. To achieve this, there's an unprivileged bot accountbot
with a fork ofupstream/repo
(bot/repo
) andupstream/repo
has a Personal Access Token forbot
in its secrets.w
runs with no permissions (permissions: {contents: none}
), uses thebot
credential to check outupstream/repo
, and usespush-to-fork
to submit PRs from abot/repo
branch.Now I'd like to modify
w
and test my changes. I think these are my options:Fork
upstream/repo
tobgilbert/repo
, set up my fork with a PAT forbot
(or for a separatebot-staging
account, to avoid testing with the prod account), and run the workflow. This fails with:When testing
w
, disablepush-to-fork
and setpermissions: {contents: write, pull-requests: write}
, so that PRs tobgilbert/repo
are created from branches inbgilbert/repo
. This is what I've been doing, but as a result I'm testingw
with more permissions than it'll have in production. I've definitely pushed broken code to prod as a result of this.Create my own
bgilbert-bot
account containing a fork ofbgilbert/repo
. This lets me test with an environment similar to prod, but requires me to have a second GitHub account for testing, and accounts are pretty heavyweight. Ifw
has multiple developers, they each need their own bot account (or to share an account but constantly delete and recreate its fork), since an account can't have multiple forks of forks ofupstream/repo
.Could the "is not a fork of" test be removed? GitHub doesn't require it; any repo in the network of
upstream/repo
can send PRs to any other repo in the network.Steps to reproduce
I don't have a minimized reproducer handy, but could create one if needed.
The text was updated successfully, but these errors were encountered: