mirror of
https://code.forgejo.org/actions/cascading-pr.git
synced 2025-04-21 08:28:44 +00:00
reword the introduction and clarify the purpose
This commit is contained in:
parent
15dc3ec7a7
commit
35760ba012
2 changed files with 50 additions and 16 deletions
33
README.md
33
README.md
|
@ -4,20 +4,26 @@ Create and synchronize a PR in a dependent repository
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
|
|
||||||
When used in a workflow triggered by a PR event, it will create,
|
If repository A depends on repository B, `cascadinging-pr` can be
|
||||||
update and close a matching PR in another repository. Whenever the
|
used by a workflow in repository B to trigger the CI on repository A
|
||||||
matching PR is modified by `cascading-pr`, it waits for the CI to
|
and verify it passes when it will upgrade with the proposed change
|
||||||
pass otherwise it fails.
|
from repository B.
|
||||||
|
|
||||||
|
When used in a workflow triggered by a PR event in `origin-repo`,
|
||||||
|
`cascading-pr` will create, update and close a matching PR in
|
||||||
|
another repository (`destination-repo`). When the PR is updated,
|
||||||
|
`cascading-pr` subsequently will update the matching PR. The
|
||||||
|
worfklows in `origin-repo` will wait for the workflow in
|
||||||
|
`destination-repo` to complete. If the workflow in
|
||||||
|
`destination-repo` fails, the workflow in `origin-repo` will also
|
||||||
|
fail.
|
||||||
|
|
||||||
As an example, when a PR is created in
|
As an example, when a PR is created in
|
||||||
[`forgejo/runner`](https://code.forgejo.org/forgejo/runner/), a
|
[`forgejo/runner`](https://code.forgejo.org/forgejo/runner/), a
|
||||||
matching PR is created in
|
matching PR is created in
|
||||||
[`actions/setup-forgejo`](https://code.forgejo.org/actions/setup-forgejo/)
|
[`actions/setup-forgejo`](https://code.forgejo.org/actions/setup-forgejo/)
|
||||||
with the proposed change. `cascading-pr` will wait until the CI in
|
with the proposed change. `cascading-pr` will wait until the CI in
|
||||||
`actions/setup-forgejo` is successful. When the PR in
|
`actions/setup-forgejo` is successful.
|
||||||
`forgejo/runner` is merged, the matching PR 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 origin repository
|
The `update` script is expected to be found in the origin repository
|
||||||
running the PR. It is given four arguments:
|
running the PR. It is given four arguments:
|
||||||
|
@ -34,6 +40,17 @@ running the PR. It is given four arguments:
|
||||||
If changes are found in the destination repository directory after the `update` script runs,
|
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.
|
they will be pushed as a new commit in the PR.
|
||||||
|
|
||||||
|
`origin-token` is used when accessing `origin-repo` and needs the
|
||||||
|
`read:user`, `read:repository` and `write:issue` scopes.
|
||||||
|
|
||||||
|
`destination-token` is used to push the branch that contains an
|
||||||
|
update to `destination-repo` and to open a pull request. It needs
|
||||||
|
the `read:user`, `write:repository` and `write:issue` scopes.
|
||||||
|
|
||||||
|
It is recommended that a dedicated user is used to create
|
||||||
|
`destination-token` and that `destination-fork-repo` is always used
|
||||||
|
unless the users who are able to create pull requests are trusted.
|
||||||
|
|
||||||
When the PR is from a forked repository, the `update` script is checked out from
|
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.
|
the default branch instead of the head branch of the fork.
|
||||||
|
|
||||||
|
|
33
action.yml
33
action.yml
|
@ -3,20 +3,26 @@ name: 'Cascading PR'
|
||||||
author: 'Forgejo authors'
|
author: 'Forgejo authors'
|
||||||
description: |
|
description: |
|
||||||
|
|
||||||
When used in a workflow triggered by a PR event, it will create,
|
If repository A depends on repository B, `cascadinging-pr` can be
|
||||||
update and close a matching PR in another repository. Whenever the
|
used by a workflow in repository B to trigger the CI on repository A
|
||||||
matching PR is modified by `cascading-pr`, it waits for the CI to
|
and verify it passes when it will upgrade with the proposed change
|
||||||
pass otherwise it fails.
|
from repository B.
|
||||||
|
|
||||||
|
When used in a workflow triggered by a PR event in `origin-repo`,
|
||||||
|
`cascading-pr` will create, update and close a matching PR in
|
||||||
|
another repository (`destination-repo`). When the PR is updated,
|
||||||
|
`cascading-pr` subsequently will update the matching PR. The
|
||||||
|
worfklows in `origin-repo` will wait for the workflow in
|
||||||
|
`destination-repo` to complete. If the workflow in
|
||||||
|
`destination-repo` fails, the workflow in `origin-repo` will also
|
||||||
|
fail.
|
||||||
|
|
||||||
As an example, when a PR is created in
|
As an example, when a PR is created in
|
||||||
[`forgejo/runner`](https://code.forgejo.org/forgejo/runner/), a
|
[`forgejo/runner`](https://code.forgejo.org/forgejo/runner/), a
|
||||||
matching PR is created in
|
matching PR is created in
|
||||||
[`actions/setup-forgejo`](https://code.forgejo.org/actions/setup-forgejo/)
|
[`actions/setup-forgejo`](https://code.forgejo.org/actions/setup-forgejo/)
|
||||||
with the proposed change. `cascading-pr` will wait until the CI in
|
with the proposed change. `cascading-pr` will wait until the CI in
|
||||||
`actions/setup-forgejo` is successful. When the PR in
|
`actions/setup-forgejo` is successful.
|
||||||
`forgejo/runner` is merged, the matching PR 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 origin repository
|
The `update` script is expected to be found in the origin repository
|
||||||
running the PR. It is given four arguments:
|
running the PR. It is given four arguments:
|
||||||
|
@ -33,6 +39,17 @@ description: |
|
||||||
If changes are found in the destination repository directory after the `update` script runs,
|
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.
|
they will be pushed as a new commit in the PR.
|
||||||
|
|
||||||
|
`origin-token` is used when accessing `origin-repo` and needs the
|
||||||
|
`read:user`, `read:repository` and `write:issue` scopes.
|
||||||
|
|
||||||
|
`destination-token` is used to push the branch that contains an
|
||||||
|
update to `destination-repo` and to open a pull request. It needs
|
||||||
|
the `read:user`, `write:repository` and `write:issue` scopes.
|
||||||
|
|
||||||
|
It is recommended that a dedicated user is used to create
|
||||||
|
`destination-token` and that `destination-fork-repo` is always used
|
||||||
|
unless the users who are able to create pull requests are trusted.
|
||||||
|
|
||||||
When the PR is from a forked repository, the `update` script is checked out from
|
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.
|
the default branch instead of the head branch of the fork.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue