-
Notifications
You must be signed in to change notification settings - Fork 129
Make PR to a different repo #18
Comments
You can try to manually set $GITHUB_REPOSITORY environment variable as this is what our action uses. If GitHub doesn't allow it you can create a PR to add it as an input. |
Thanks for the quick response.
This is explicitly forbidden. None of the environment variables prefixed by GITHUB_ can be changes. So I'll investigate a bit further and consider making a PR. |
Yep, that's what I figured, we'll need a new input |
I too would like to be able to create a pull request against another repo. My story: I have a package repo that keeps the generated docs in source control. When someone makes a PR the job:
This works great if the PR comes from the same repo, but otherwise the repo doesn't have the source branch to open the PR against. So I need to be able to PR against the originating fork - ideally without me having to figure out what that fork is. |
@sparksp Once pr_repository PR is in, you can write a small script to figure out the origin repo and provide it in a variable |
Thanks for responding! I actually found that I won't be able to do what I wanted because PR's raised by a fork get a read-only GitHub token so they can't make any changes at all. I don't want to go down the route of using a personal access token for this. So instead I'm now only creating PRs from push events instead of pull_request events. |
We want to this functionality as well, the use case is when a node package gets a version update to make PRs to several other repositories updating the package.json dependency version. |
@montanaflynn Does Does #59 fit your needs? It adds support to specify repository to make PR. We need some help with testing on that PR in order to merge it~ |
I think it's a piece of what we're trying to achieve, first we need to checkout the repo, make a new branch, update the package.json, commit, push it, then make the PR. We are still in the idea phase but will reply back once we start implementing it. We have a node package that is used by several other repos and manually updating them is a pain. |
@montanaflynn A custom GitHub workflow is probably most suitable for your use-case. Feel free to contact me if you need any help~ |
@montanaflynn That's pretty much identical to what I'm currently doing. I'm using |
Resolved in #69. |
Thanks a lot for sharing this action!
I am trying to use it in a workflow to make a PR to a different repo. Specifically, I am trying to set up a workflow to make a PR to update a submodule in a different repo whenever the submodule target repo is changed.
The repo where the action is running is
pangeo-gallery/example-gallery
(the target of the submodule), while the repo where the submodule lives ispangeo-gallery/pangeo-gallery
I am getting this error:
It looks like the action is trying to make the PR from
pangeo-gallery/example-gallery
, rather thanpangeo-gallery/pangeo-gallery
. I would like it to come frompangeo-gallery/pangeo-gallery
, which I have already checked out earlier in my workflow.Is this possible?
My workflow is here:
/~https://github.com/pangeo-gallery/example-gallery/blob/master/.github/workflows/pangeo-gallery.yaml
You can see the log here:
/~https://github.com/pangeo-gallery/example-gallery/runs/515467109?check_suite_focus=true#step:6:11
The text was updated successfully, but these errors were encountered: