From 6690ca120cbfdd18ff2931dcb1ac541c072adac4 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 10 Mar 2025 09:58:28 +0100 Subject: [PATCH] Revert "Forbid develop branch fork contributions" This reverts commit 9924a048494e4d59c2bb22a8fffae744c17e1ee0. --- .github/workflows/pull_request.yml | 34 +----------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 42537c54b4..dde2a75a6e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,12 +1,7 @@ name: Pull Request on: pull_request: - types: [ opened, edited, labeled, unlabeled, synchronize ] - workflow_call: - secrets: - ELEMENT_BOT_TOKEN: - required: true - + types: [ opened, labeled, unlabeled ] jobs: prevent-blocked: name: Prevent blocked @@ -48,30 +43,3 @@ jobs: repo: context.repo.repo, labels: ['Z-Community-PR'] }); - - close-if-fork-develop: - name: Forbid develop branch fork contributions - runs-on: ubuntu-latest - if: > - github.event.action == 'opened' && - github.event.pull_request.head.ref == 'develop' && - github.event.pull_request.head.repo.full_name != github.repository - steps: - - name: Close pull request - uses: actions/github-script@v7 - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: "Thanks for opening this pull request, unfortunately we do not accept contributions from the main" + - " branch of your fork, please re-open once you switch to an alternative branch for everyone's sanity.", - }); - - github.rest.pulls.update({ - pull_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - state: 'closed' - });