Skip to content

Commit

Permalink
Fix all-commits-in-master ambiguous argument issue (#4711)
Browse files Browse the repository at this point in the history
Tested here: hqpho#8
  • Loading branch information
hqpho authored Nov 5, 2024
1 parent 55eed44 commit 3d069c4
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 3d069c4

Please sign in to comment.