do not override the token

This commit is contained in:
Earl Warren 2023-10-12 22:43:32 +02:00
parent a32b74cb81
commit 36e8cdcda4
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 2 additions and 2 deletions

View file

@ -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() {