diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 291416f828..529249885b 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -127,9 +127,15 @@ jobs: - name: resolve dependency run: npm install -g @graphql-inspector/cli - - - name: Clone API repository - run: git clone https://github.com/PalisadoesFoundation/talawa-api && ls -a + + - name: Clone API Repository + run: | + # Retrieve the complete branch name directly from the GitHub context + FULL_BRANCH_NAME=${{ github.base_ref }} + echo "FULL_Branch_NAME: $FULL_BRANCH_NAME" + + # Clone the specified repository using the extracted branch name + git clone --branch $FULL_BRANCH_NAME https://github.com/PalisadoesFoundation/talawa-api && ls -a - name: Validate Documents run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql'