Open vinibosch opened 8 months ago
You can do that already today, you just have to checkout the repository where you want to create the pull request. You can't do that with the provided secrets.GITHUB_TOKEN
as it's scoped to only the current repository, I recommend to register a GitHub app with contents:write
and pull_requests:write
permissions and then use https://github.com/actions/create-github-app-token to create a token and use that token in actions/checkout
hi @gr2m, is there a way to checkout 2 repos but open a PR against a specific one only?
eg:
# default action stuff
...
steps:
- name: Checkout repo1
uses: actions/checkout@v4
with:
path: repo1
- name: Checkout repo2
uses: actions/checkout@v4
with:
repository: org/repo2
token: ${{ secrets.TOKEN_1 }}
path: repo2
# change files based on repo1 to be commited on repo2
...
- name: Commit file to repo2 repo
uses: gr2m/create-or-update-pull-request-action@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_2 }}
with:
branch: "auto-repo2-update"
commit-message: "repo2 auto-update"
title: repo2 updates
assignees: ${{ github.actor }}
auto-merge: squash
I've tried with and without the path: repo2/
and it doesn't work.
The error is (with it):
Error: Command failed with exit code 128 (Unknown system error -128): git status repo2/
Without it:
Error: Command failed with exit code 128 (Unknown system error -128): git status
I don't know, I'd have to look into it myself. I suggest you fork the repo and experiment to find out
Hello, do you have any plans to add support for creating Pull Requests on a different repository?