1
0
Fork 0
mirror of https://code.forgejo.org/actions/cascading-pr synced 2025-03-15 06:46:59 +01:00
This commit is contained in:
Earl Warren 2023-10-12 14:57:38 +02:00
parent 2de0a1208c
commit 731e463dfd
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 8 additions and 0 deletions

View file

@ -14,4 +14,5 @@ forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.21
forgejo-runner.sh setup
firefox http://$(cat forgejo-ip):3000
tests/run.sh --debug
tests/run.sh --debug create_pull_request
```

View file

@ -29,6 +29,8 @@ inputs:
update:
description: 'path to the script to update the content of the cascading PR'
required: true
prefix:
description: 'prefix of the cascading PR created on destination-repo (default to {origin-repo})'
verbose:
description: 'if true print verbose information'
default: false
@ -57,3 +59,4 @@ runs:
--destination-token "${{ inputs.destination-token }}" \
--destination-branch "${{ inputs.destination-branch }}" \
--update "${{ inputs.update }}"
--prefix "${{ inputs.prefix }}"

4
cascading-pr.sh Normal file → Executable file
View file

@ -7,6 +7,7 @@ source $SELF_DIR/cascading-pr-lib.sh
function run() {
options[origin_host_port]=$(host_port ${options[origin_url]})
options[destination_host_port]=$(host_port ${options[destination_url]})
: ${options[prefix]:=${options[origin_repo]}}
# login destination
# open a PR on destination
@ -55,6 +56,9 @@ function main() {
shift
options[update]=$1
;;
--prefix)
shift
options[prefix]=$1
*)
"${1:-run}"
return 0