github.com/kyma-project/kyma-environment-broker@v0.0.1/scripts/dependabot_helper.bash (about) 1 #!/usr/bin/env bash 2 3 set -xeuo pipefail 4 5 prs=( $(gh pr list --json number,author,title --jq '.[] | select(.author.login == "app/dependabot") | select(.title | endswith("/components/kyma-environment-broker")) | .number') ) 6 body="/lgtm 7 /approve" 8 9 for pr in "${prs[@]}"; do 10 is_draft=$(gh pr view ""${pr} --json isDraft --jq '.isDraft') 11 if [[ "$is_draft" == true ]]; then 12 continue 13 fi 14 status=$(gh pr view "${pr}" --json reviewDecision | jq --raw-output '.reviewDecision') 15 if [[ "$status" == 'REVIEW_REQUIRED' ]]; then 16 gh pr review "${pr}" --approve --body "${body}" 17 fi 18 done