From 885c4ceeb934213cdc90634df7b41abf53ce4444 Mon Sep 17 00:00:00 2001 From: Akhilender Date: Wed, 17 Jan 2024 15:22:34 +0530 Subject: [PATCH] feat: Added target branch checking PR workflow - If the target branch is not develop than this check will fail. Signed-off-by: Akhilender --- .github/workflows/pull-requests.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 529249885b..c3955700eb 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -139,3 +139,13 @@ jobs: - name: Validate Documents run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' + + Check-Target-Branch: + name: Check Target Branch + runs-on: ubuntu-latest + steps: + - name: Check if the target branch is develop + if: github.event.pull_request.base.ref != 'develop' + run: | + echo "Error: Pull request target branch must be 'develop'. Please refer PR_GUIDELINES.md" + exit 1 \ No newline at end of file