Skip to content

Commit

Permalink
update (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec authored Dec 4, 2024
1 parent 02adabe commit f3efea6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/actions/backport/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ runs:
MERGE_COMMIT=${{ github.sha }}
echo "MERGE_COMMIT=$MERGE_COMMIT" >> $GITHUB_ENV
# Find the pull request associated with the squashed merge commit.
echo "Looking for PR associated with commit $MERGE_COMMIT... with label ${{ inputs.label }}"
PR=$(gh pr list --state merged --json number,title,headRefName,mergeCommit,labels \
--jq ".[] | select(.mergeCommit.oid == \"$MERGE_COMMIT\" and (.labels[].name | contains(\"${{ inputs.label }}\")))")
Expand Down Expand Up @@ -52,18 +51,15 @@ runs:
git fetch --all
# Create a new branch off the specified base branch.
BASE_BRANCH="${{ inputs.base_branch }}"
BACKPORT_BRANCH="backport-${{ env.PR_NUMBER }}-to-${{ inputs.base_branch }}"
git checkout $BASE_BRANCH
git checkout -b $BACKPORT_BRANCH
# Cherry-pick the merge commit.
git cherry-pick $MERGE_COMMIT || (git cherry-pick --abort && exit 1)
git push origin $BACKPORT_BRANCH
# Create a pull request.
gh pr create \
--base $BASE_BRANCH \
--head $BACKPORT_BRANCH \
Expand Down

0 comments on commit f3efea6

Please sign in to comment.