Skip to content

Commit

Permalink
Fix all-commits-in-master ambiguous argument issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hqpho committed Nov 5, 2024
1 parent 55eed44 commit bc03b35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/all-commits-in-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ jobs:

- name: Check if commits exist in master
run: |
MASTER_BRANCH="master"
git remote add dc https://github.com/datacommonsorg/website.git
git fetch dc
MASTER_BRANCH="remotes/dc/master"
SOURCE_BRANCH=$(echo ${{ github.head_ref }})
# Get the list of commits in the source branch that are not in the master branch
MISSING_COMMITS=$(git log --pretty="%H - %s" $MASTER_BRANCH..$SOURCE_BRANCH)
MISSING_COMMITS=$(git log --pretty="%H - %s" $MASTER_BRANCH..$SOURCE_BRANCH --)
if [[ -n "$MISSING_COMMITS" ]]; then
echo "ERROR: The following commits are not present in $MASTER_BRANCH:"
Expand Down

0 comments on commit bc03b35

Please sign in to comment.