From b9df0aac372bd263c04b1716d33085420fa17fdd Mon Sep 17 00:00:00 2001 From: Aarish Shah Mohsin Date: Sun, 17 Mar 2024 21:35:31 +0530 Subject: [PATCH] Added action check for different source and target branches (#1715) * Added action check for different source and target branches * changed to bash deleting python * added to code quality checks --- .github/workflows/pull-request.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0a78207153..0e90783ce7 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -21,7 +21,7 @@ env: jobs: Code-Quality-Checks: - name: Performs linting, formatting, type-checking + name: Performs linting, formatting, type-checking, checking for different source and target branch runs-on: ubuntu-latest steps: - name: Checkout the Repository @@ -66,6 +66,13 @@ jobs: chmod +x .github/workflows/compare_translations.py python .github/workflows/compare_translations.py --directory public/locales + - name: Check if the source and target branches are different + if: ${{ github.event.pull_request.base.ref == github.event.pull_request.head.ref }} + run: | + echo "Source Branch ${{ github.event.pull_request.head.ref }}" + echo "Target Branch ${{ github.event.pull_request.base.ref }}" + echo "Error: Source and Target Branches are the same. Please ensure they are different." + exit 1 Check-Changed-Files: name: File count, sensitive files and branch check