Skip to content

Commit

Permalink
PR head
Browse files Browse the repository at this point in the history
  • Loading branch information
hqpho committed Nov 5, 2024
1 parent f77851a commit a06463d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/all-commits-in-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for accurate comparison
ref: ${{ github.ref }} # Check out the source branch
# Fetch all history for accurate comparison
fetch-depth: 0
# Check out the PR branch
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Check if commits exist in master
run: |
Expand All @@ -23,9 +26,9 @@ jobs:
MISSING_COMMITS=$(git log --no-merges --pretty="%H - %s" $MASTER_BRANCH..HEAD --)
if [[ -n "$MISSING_COMMITS" ]]; then
echo "ERROR: The following non-merge commits are not present in $MASTER_BRANCH:"
echo "ERROR: The following commits are not present in $MASTER_BRANCH:"
echo "$MISSING_COMMITS"
exit 1
fi
echo "All non-merge commits are present in $MASTER_BRANCH"
echo "All commits are present in $MASTER_BRANCH"

0 comments on commit a06463d

Please sign in to comment.