Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
chrabyrd committed Apr 18, 2024
1 parent 9ea2093 commit 576e5d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/check-base-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ jobs:
run: |
git fetch origin
CURRENT_BRANCH=$(echo "${{ github.ref }}" | cut -d'/' -f3)
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"
CURRENT_BRANCH="${{ github.event.pull_request.head.ref }}"
COMMITS_BEHIND=$(git log --oneline origin/$TARGET_BRANCH origin/$CURRENT_BRANCH)
echo CURRENT_BRANCH
COMMITS_BEHIND=$(git log --oneline origin/$TARGET_BRANCH ^$CURRENT_BRANCH)
if [ -n "$COMMITS_BEHIND" ]; then
echo "Your branch is behind the target branch. The following commits are missing:"
Expand Down

0 comments on commit 576e5d1

Please sign in to comment.