From 02b4b4e8ed10a349a08cb8bd5907791b365e7f3b Mon Sep 17 00:00:00 2001 From: Armaan Gupta Date: Thu, 20 Aug 2026 12:55:23 +0530 Subject: [PATCH 1/4] feat(check) : added extra checks for lint and to avoid forked PRs --- .github/workflows/checks.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 7f9eb1d1..1544b0dd 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -11,6 +11,12 @@ jobs: runs-on: ubuntu-latest steps: + - name: "Block Fork PRs" + if: github.event.pull_request.head.repo.fork == true + run: | + echo "PRs from forked repositories are not allowed." + exit 1 + - name: "Checkout" uses: actions/checkout@v2 with: @@ -25,6 +31,9 @@ jobs: run: | npm install npx lerna bootstrap + - name: Run Lint + run: npx lerna run eslint + - name: Run Build run: npx lerna run build From a3654f8e24befead7d8c58d61f11a6fbcf56db7c Mon Sep 17 00:00:00 2001 From: Armaan Gupta Date: Thu, 20 Aug 2026 13:01:08 +0530 Subject: [PATCH 2/4] fix the checks --- .github/workflows/checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 1544b0dd..e2d1d434 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -12,7 +12,7 @@ jobs: steps: - name: "Block Fork PRs" - if: github.event.pull_request.head.repo.fork == true + if: github.event.pull_request.head.repo.full_name != github.repository run: | echo "PRs from forked repositories are not allowed." exit 1 From e18a4b08f29b14bc539419b81e509ae7aab59df5 Mon Sep 17 00:00:00 2001 From: Armaan Gupta Date: Thu, 20 Aug 2026 13:14:04 +0530 Subject: [PATCH 3/4] fixed the checks --- .github/workflows/checks.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index e2d1d434..e9ad01b9 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -12,10 +12,13 @@ jobs: steps: - name: "Block Fork PRs" - if: github.event.pull_request.head.repo.full_name != github.repository run: | - echo "PRs from forked repositories are not allowed." - exit 1 + echo "Head repo: ${{ github.event.pull_request.head.repo.full_name }}" + echo "Base repo: ${{ github.repository }}" + if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then + echo "PRs from forked repositories are not allowed." + exit 1 + fi - name: "Checkout" uses: actions/checkout@v2 From b57856ef217f1c654bde7b032063be966428ddab Mon Sep 17 00:00:00 2001 From: Armaan Gupta Date: Thu, 20 Aug 2026 13:25:08 +0530 Subject: [PATCH 4/4] fixed the checks --- .github/workflows/checks.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index e9ad01b9..6f2af908 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -12,10 +12,13 @@ jobs: steps: - name: "Block Fork PRs" + env: + HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} + BASE_REPO: ${{ github.repository }} run: | - echo "Head repo: ${{ github.event.pull_request.head.repo.full_name }}" - echo "Base repo: ${{ github.repository }}" - if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then + echo "Head repo: $HEAD_REPO" + echo "Base repo: $BASE_REPO" + if [ "$HEAD_REPO" != "$BASE_REPO" ]; then echo "PRs from forked repositories are not allowed." exit 1 fi