run the update script from the default branch

Fixes: https://code.forgejo.org/actions/cascading-pr/issues/9
This commit is contained in:
Earl Warren 2023-10-28 17:40:09 +02:00
parent 39c71c3f40
commit 277569106a
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
6 changed files with 87 additions and 23 deletions

View file

@ -19,17 +19,23 @@ with the proposed change. `cascading-pr` will wait until the CI in
`actions/setup-forgejo` is updated to use what was just merged and
is ready to be reviewed.
The `update` script is expected to be found in the checked out repository
running the PR. It is given three arguments:
The `update` script is expected to be found in the origin repository
running the PR. It is given four arguments:
* A directory in which the destination repository is checked-out
on the base branch
* A file with the JSON describing the pull request in the
destination repository
* A directory in which the origin repository is checked-out
on the head branch
* A file with the JSON describing the pull request in the
origin repository
If changes are found in the destination repository directory, they will be
pushed as a new commit in the PR.
If changes are found in the destination repository directory after the `update` script runs,
they will be pushed as a new commit in the PR.
When the PR is from a forked repository, the `update` script is checked out from
the default branch instead of the head branch of the fork.
<!-- action-docs-description -->
<!-- action-docs-inputs -->
## Inputs