Skip to content

Commit

Permalink
Fix automated PR script
Browse files Browse the repository at this point in the history
Signed-off-by: gabriel-farache <[email protected]>
  • Loading branch information
gabriel-farache committed Nov 29, 2024
1 parent 55eee9e commit 0bbb1dd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/create_or_update_automated_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ for pr in $prs; do
git config --global user.name "${USER_NAME}"
# Get the PR details (branch)
pr_labels=$(gh pr view "$pr" --repo "$REPO" --json labels --jq '.labels[].name')
if [[ ${pr_labels[*]} =~ "do-not-merge" ]]
then
echo "PR $pr is labeled with do-not-merge, ignoring it"
exit 0
fi
for label in "${pr_labels[@]}"
do
if [[ "$label" =~ "do-not-merge" ]]
then
echo "PR $pr is labeled with do-not-merge, ignoring it"
exit 0
fi
done


pr_branch=$(gh pr view "$pr" --repo "$REPO" --json headRefName --jq '.headRefName')

Expand Down

0 comments on commit 0bbb1dd

Please sign in to comment.