From 3d069c4a76098715dcbd6dee7c3d88f3712998db Mon Sep 17 00:00:00 2001 From: Hannah Pho Date: Tue, 5 Nov 2024 13:54:16 -0500 Subject: [PATCH] Fix all-commits-in-master ambiguous argument issue (#4711) Tested here: https://github.com/hqpho/dc-website/pull/8 --- .github/workflows/all-commits-in-master.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/all-commits-in-master.yml b/.github/workflows/all-commits-in-master.yml index 06ffbbaeb9..f4ec02ee4d 100644 --- a/.github/workflows/all-commits-in-master.yml +++ b/.github/workflows/all-commits-in-master.yml @@ -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:"