Skip to content

Commit

Permalink
Wrong variable
Browse files Browse the repository at this point in the history
  • Loading branch information
gildas committed Nov 15, 2023
1 parent fd92a47 commit bfde620
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions hooks/common/pre-flow-feature-finish
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ elif [[ $ORIGIN_URL =~ ^git@bitbucket\.org ]]; then
[[ -z $token ]] && die "Bitbucket's API Access Token is empty"
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$(curl -sS \
--header "Authorization: Bearer $(git config bitbucket.api.username)" \
--header "Authorization: Bearer $token" \
https://api.bitbucket.org/2.0/repositories/${repo}/pullrequests?state=ALL |\
jq -r --arg BRANCH $BRANCH '
.values |= sort_by(.updated_on) |
Expand All @@ -96,7 +96,7 @@ elif [[ $ORIGIN_URL =~ ^https://.*bitbucket\.org ]]; then
[[ -z $token ]] && die "Bitbucket's API Access Token is empty"
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$(curl -sS \
--header "Authorization: Bearer $(git config bitbucket.api.username)" \
--header "Authorization: Bearer $token" \
https://api.bitbucket.org/2.0/repositories/${repo}/pullrequests?state=ALL |\
jq -r --arg BRANCH $BRANCH '
.values |= sort_by(.updated_on) |
Expand Down
4 changes: 2 additions & 2 deletions hooks/common/pre-flow-hotfix-finish
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ elif [[ $ORIGIN_URL =~ ^git@bitbucket\.org ]]; then
[[ -z $token ]] && die "Bitbucket's API Access Token is empty"
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$(curl -sS \
--header "Authorization: Bearer $(git config bitbucket.api.username)" \
--header "Authorization: Bearer $token" \
https://api.bitbucket.org/2.0/repositories/${repo}/pullrequests?state=ALL |\
jq -r --arg BRANCH $BRANCH '
.values |= sort_by(.updated_on) |
Expand All @@ -96,7 +96,7 @@ elif [[ $ORIGIN_URL =~ ^https://.*bitbucket\.org ]]; then
[[ -z $token ]] && die "Bitbucket's API Access Token is empty"
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$(curl -sS \
--header "Authorization: Bearer $(git config bitbucket.api.username)" \
--header "Authorization: Bearer $token" \
https://api.bitbucket.org/2.0/repositories/${repo}/pullrequests?state=ALL |\
jq -r --arg BRANCH $BRANCH '
.values |= sort_by(.updated_on) |
Expand Down
4 changes: 2 additions & 2 deletions hooks/common/pre-flow-release-finish
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ elif [[ $ORIGIN_URL =~ ^git@bitbucket\.org ]]; then
[[ -z $token ]] && die "Bitbucket's API Access Token is empty"
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$(curl -sS \
--header "Authorization: Bearer $(git config bitbucket.api.username)" \
--header "Authorization: Bearer $token" \
https://api.bitbucket.org/2.0/repositories/${repo}/pullrequests?state=ALL |\
jq -r --arg BRANCH $BRANCH '
.values |= sort_by(.updated_on) |
Expand All @@ -96,7 +96,7 @@ elif [[ $ORIGIN_URL =~ ^https://.*bitbucket\.org ]]; then
[[ -z $token ]] && die "Bitbucket's API Access Token is empty"
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$(curl -sS \
--header "Authorization: Bearer $(git config bitbucket.api.username)" \
--header "Authorization: Bearer $token" \
https://api.bitbucket.org/2.0/repositories/${repo}/pullrequests?state=ALL |\
jq -r --arg BRANCH $BRANCH '
.values |= sort_by(.updated_on) |
Expand Down

0 comments on commit bfde620

Please sign in to comment.