Skip to content

Commit

Permalink
Bitbucket: use bb version 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gildas committed Dec 12, 2023
1 parent 3b62208 commit 329203c
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 @@ -72,7 +72,7 @@ elif [[ $ORIGIN_URL =~ ^git@bitbucket\.org ]]; then
profile=$(git config bitbucket.cli.profile)
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$( \
bb ${profile:+--profile $profile} pr list --repository $repo |\
bb ${profile:+--profile $profile} pr list --repository $repo --state all --output json |\
jq -r --arg BRANCH $BRANCH '
. |= sort_by(.updated_on) |
last(.[] | select(.source.branch.name == $BRANCH) | .state)'
Expand All @@ -93,7 +93,7 @@ elif [[ $ORIGIN_URL =~ ^https://.*bitbucket\.org ]]; then
profile=$(git config bitbucket.cli.profile)
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$( \
bb ${profile:+--profile $profile} pr list --repository $repo |\
bb ${profile:+--profile $profile} pr list --repository $repo --state all --output json |\
jq -r --arg BRANCH $BRANCH '
. |= sort_by(.updated_on) |
last(.[] | select(.source.branch.name == $BRANCH) | .state)'
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 @@ -72,7 +72,7 @@ elif [[ $ORIGIN_URL =~ ^git@bitbucket\.org ]]; then
profile=$(git config bitbucket.cli.profile)
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$( \
bb ${profile:+--profile $profile} pr list --repository $repo |\
bb ${profile:+--profile $profile} pr list --repository $repo --state all --output json |\
jq -r --arg BRANCH $BRANCH '
. |= sort_by(.updated_on) |
last(.[] | select(.source.branch.name == $BRANCH) | .state)'
Expand All @@ -93,7 +93,7 @@ elif [[ $ORIGIN_URL =~ ^https://.*bitbucket\.org ]]; then
profile=$(git config bitbucket.cli.profile)
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$( \
bb ${profile:+--profile $profile} pr list --repository $repo |\
bb ${profile:+--profile $profile} pr list --repository $repo --state all --output json |\
jq -r --arg BRANCH $BRANCH '
. |= sort_by(.updated_on) |
last(.[] | select(.source.branch.name == $BRANCH) | .state)'
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 @@ -72,7 +72,7 @@ elif [[ $ORIGIN_URL =~ ^git@bitbucket\.org ]]; then
profile=$(git config bitbucket.cli.profile)
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$( \
bb ${profile:+--profile $profile} pr list --repository $repo |\
bb ${profile:+--profile $profile} pr list --repository $repo --state all --output json |\
jq -r --arg BRANCH $BRANCH '
. |= sort_by(.updated_on) |
last(.[] | select(.source.branch.name == $BRANCH) | .state)'
Expand All @@ -93,7 +93,7 @@ elif [[ $ORIGIN_URL =~ ^https://.*bitbucket\.org ]]; then
profile=$(git config bitbucket.cli.profile)
verbose "Checking Pull Request on repository $repo for $BRANCH"
PR_STATE=$( \
bb ${profile:+--profile $profile} pr list --repository $repo |\
bb ${profile:+--profile $profile} pr list --repository $repo --state all --output json |\
jq -r --arg BRANCH $BRANCH '
. |= sort_by(.updated_on) |
last(.[] | select(.source.branch.name == $BRANCH) | .state)'
Expand Down

0 comments on commit 329203c

Please sign in to comment.