diff --git a/README.md b/README.md index 1c4d018..af9b18b 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/action.yml b/action.yml index a39b271..a2440c7 100644 --- a/action.yml +++ b/action.yml @@ -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 }}" diff --git a/cascading-pr.sh b/cascading-pr.sh old mode 100644 new mode 100755 index 2af8f8a..10c7b59 --- a/cascading-pr.sh +++ b/cascading-pr.sh @@ -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