mirror of
https://code.forgejo.org/actions/cascading-pr.git
synced 2025-07-22 15:28:23 +02:00
chore(tests): fail if token cannot be obtained
This commit is contained in:
parent
d7e60d3ba3
commit
e5c5476a44
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,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 '{"name":"'$name'","scopes":["write:repository","write:issue","read:organization","read:user"]}' ${options[url]}/api/v1/users/$username/tokens | jq --raw-output .sha1 | tee $TMPDIR/$username/repo-token
|
curl --fail -sS -f -H Content-Type:application/json --user "$username:${options[password]}" --data '{"name":"'$name'","scopes":["write:repository","write:issue","read:organization","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
Add a link
Reference in a new issue