diff --git a/README.md b/README.md index bf5ae82..a2fccd6 100644 --- a/README.md +++ b/README.md @@ -16,5 +16,5 @@ url=http://$(cat forgejo-ip):3000 firefox $url tests/run.sh --debug tests/run.sh --debug create_pull_request -cascading-pr.sh --debug --origin-url "$url" --origin-repo "user1/originrepo" --origin-token "$(cat /tmp/cascading-pr-test/user1/token)" --origin-pr 1 --destination-url "$url" --destination-repo "user2/destinationrepo" --destination-token "$(cat /tmp/cascading-pr-test/user2/token)" --destination-branch "main" --update "upgraded" +cascading-pr.sh --debug --origin-url "$url" --origin-repo "user1/originrepo" --origin-token "$(cat /tmp/cascading-pr-test/user1/repo-token)" --origin-pr 1 --destination-url "$url" --destination-repo "user2/destinationrepo" --destination-token "$(cat /tmp/cascading-pr-test/user2/repo-token)" --destination-branch "main" --update "upgraded" ``` diff --git a/tests/run.sh b/tests/run.sh index f8060e6..f87bf89 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -29,7 +29,7 @@ function user_curl() { function user_token() { local username=$1 name=$2 - curl -sS -f -H Content-Type:application/json --user "$username:${options[password]}" --data-raw '{"name":"'$name'","scopes":["write:repository","write:issue"]}' ${options[url]}/api/v1/users/$username/tokens | jq --raw-output .sha1 | tee $TMPDIR/$username/token + curl -sS -f -H Content-Type:application/json --user "$username:${options[password]}" --data-raw '{"name":"'$name'","scopes":["write:repository","write:issue","read:user"]}' ${options[url]}/api/v1/users/$username/tokens | jq --raw-output .sha1 | tee $TMPDIR/$username/repo-token } function user_secret() {