mirror of
https://code.forgejo.org/actions/cascading-pr
synced 2025-03-15 14:54:40 +01:00
do not override the token
This commit is contained in:
parent
a32b74cb81
commit
36e8cdcda4
2 changed files with 2 additions and 2 deletions
|
@ -16,5 +16,5 @@ url=http://$(cat forgejo-ip):3000
|
||||||
firefox $url
|
firefox $url
|
||||||
tests/run.sh --debug
|
tests/run.sh --debug
|
||||||
tests/run.sh --debug create_pull_request
|
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"
|
||||||
```
|
```
|
||||||
|
|
|
@ -29,7 +29,7 @@ function user_curl() {
|
||||||
function user_token() {
|
function user_token() {
|
||||||
local username=$1 name=$2
|
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() {
|
function user_secret() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue