mirror of
https://code.forgejo.org/actions/cascading-pr
synced 2025-03-15 14:54:40 +01:00
prefix
This commit is contained in:
parent
2de0a1208c
commit
731e463dfd
3 changed files with 8 additions and 0 deletions
|
@ -14,4 +14,5 @@ forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.21
|
||||||
forgejo-runner.sh setup
|
forgejo-runner.sh setup
|
||||||
firefox http://$(cat forgejo-ip):3000
|
firefox http://$(cat forgejo-ip):3000
|
||||||
tests/run.sh --debug
|
tests/run.sh --debug
|
||||||
|
tests/run.sh --debug create_pull_request
|
||||||
```
|
```
|
||||||
|
|
|
@ -29,6 +29,8 @@ inputs:
|
||||||
update:
|
update:
|
||||||
description: 'path to the script to update the content of the cascading PR'
|
description: 'path to the script to update the content of the cascading PR'
|
||||||
required: true
|
required: true
|
||||||
|
prefix:
|
||||||
|
description: 'prefix of the cascading PR created on destination-repo (default to {origin-repo})'
|
||||||
verbose:
|
verbose:
|
||||||
description: 'if true print verbose information'
|
description: 'if true print verbose information'
|
||||||
default: false
|
default: false
|
||||||
|
@ -57,3 +59,4 @@ runs:
|
||||||
--destination-token "${{ inputs.destination-token }}" \
|
--destination-token "${{ inputs.destination-token }}" \
|
||||||
--destination-branch "${{ inputs.destination-branch }}" \
|
--destination-branch "${{ inputs.destination-branch }}" \
|
||||||
--update "${{ inputs.update }}"
|
--update "${{ inputs.update }}"
|
||||||
|
--prefix "${{ inputs.prefix }}"
|
||||||
|
|
4
cascading-pr.sh
Normal file → Executable file
4
cascading-pr.sh
Normal file → Executable file
|
@ -7,6 +7,7 @@ source $SELF_DIR/cascading-pr-lib.sh
|
||||||
function run() {
|
function run() {
|
||||||
options[origin_host_port]=$(host_port ${options[origin_url]})
|
options[origin_host_port]=$(host_port ${options[origin_url]})
|
||||||
options[destination_host_port]=$(host_port ${options[destination_url]})
|
options[destination_host_port]=$(host_port ${options[destination_url]})
|
||||||
|
: ${options[prefix]:=${options[origin_repo]}}
|
||||||
|
|
||||||
# login destination
|
# login destination
|
||||||
# open a PR on destination
|
# open a PR on destination
|
||||||
|
@ -55,6 +56,9 @@ function main() {
|
||||||
shift
|
shift
|
||||||
options[update]=$1
|
options[update]=$1
|
||||||
;;
|
;;
|
||||||
|
--prefix)
|
||||||
|
shift
|
||||||
|
options[prefix]=$1
|
||||||
*)
|
*)
|
||||||
"${1:-run}"
|
"${1:-run}"
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue