Skip to content

Commit

Permalink
Remove PR reviewers case
Browse files Browse the repository at this point in the history
  • Loading branch information
hbenali committed Oct 11, 2023
1 parent 439f0e6 commit 69933ed
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions github/backportPR.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ getJsonItem() {
echo $PR_JSON | jq -r ".$1"
}

getPRReviewers() {
echo $PR_JSON | jq -r '[ .requested_reviewers[].login ] | join(",")'
}

# Sanitize PR URL
PR_URL=$(echo ${PR_URL:-} | grep -oP 'https://github.com/[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+/pull/[0-9]+')
if [ -z "${PR_URL:-}"]; then
Expand Down Expand Up @@ -40,7 +36,6 @@ echo "OK PR merge commit is ${PR_MERGE_COMMIT}"
PR_TITLE=$(getJsonItem title)
PR_BODY=$(getJsonItem body)
PR_OWNER=$(getJsonItem user.login)
PR_REVIEWERS=$(getPRReviewers)
PR_REPO=$(getJsonItem head.repo.name)
git clone $PR_CLONE_URL &>/dev/null
pushd ${PR_REPO}
Expand Down Expand Up @@ -68,14 +63,6 @@ git push origin HEAD
if [ ${REVIEWERS:-} = "_OWNER_" ]; then
REVIEWERS=$PR_OWNER
fi
if [ ${REVIEWERS:-} = "_REVIEWERS_" ]; then
if [ -z "${PR_REVIEWERS:-}" ]; then
echo "Error: This PR does not have reviewers! Please select other reviewers. Abort"
exit 1
else
REVIEWERS=$PR_REVIEWERS
fi
fi
if [ ! -z ${GH_ACTOR_TOKEN:-} ]; then
export GH_TOKEN=${GH_ACTOR_TOKEN}
fi
Expand Down

0 comments on commit 69933ed

Please sign in to comment.