From 511e6efbbc3dc937faf87d247dc15ac7eee2f9b4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:08:18 +0000 Subject: [PATCH 1/4] chore: add workflow to comment on fork PRs --- .github/workflows/fork-pr-comment.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/fork-pr-comment.yml diff --git a/.github/workflows/fork-pr-comment.yml b/.github/workflows/fork-pr-comment.yml new file mode 100644 index 0000000000..67fbc3a6de --- /dev/null +++ b/.github/workflows/fork-pr-comment.yml @@ -0,0 +1,36 @@ +name: Comment on fork pull requests + +on: + pull_request_target: + types: [opened] + +jobs: + comment: + name: Post fork PR comment + runs-on: ubuntu-latest + permissions: + pull-requests: write + if: github.event.pull_request.head.repo.full_name != github.repository + steps: + - name: Post comment + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: [ + 'Thank you for your pull request! :tada:', + '', + 'We noticed that this PR was submitted from a fork. For the best experience with our CI system, we recommend contributing from a branch directly inside the **eic/EICrecon** repository.', + '', + 'To do so, please consider:', + '1. Becoming a member of the [**eic** organization](https://github.com/eic)', + '2. Joining the **ePIC Devs** team within the organization', + '', + 'Visit [github.com/eic](https://github.com/eic) for more information and instructions on how to join.', + '', + 'Once you are a member, you will be able to push branches directly to this repository and open pull requests without needing a fork.', + ].join('\n') + }) From d79b1533261b41c8dd086a30d4b89ba8f7c85845 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 29 Jul 2026 14:12:37 -0500 Subject: [PATCH 2/4] docs: add line encouraging closing the fork pull request --- .github/workflows/fork-pr-comment.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/fork-pr-comment.yml b/.github/workflows/fork-pr-comment.yml index 67fbc3a6de..a32c2cfc4c 100644 --- a/.github/workflows/fork-pr-comment.yml +++ b/.github/workflows/fork-pr-comment.yml @@ -32,5 +32,7 @@ jobs: 'Visit [github.com/eic](https://github.com/eic) for more information and instructions on how to join.', '', 'Once you are a member, you will be able to push branches directly to this repository and open pull requests without needing a fork.', + '', + 'Since this pull request won't be able to be assessed and merged, you are welcome to close it when you have opened a new pull request from a branch in the repository.', ].join('\n') }) From 742c2f411fd56176f25dc494bc88d5aea98318ce Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 29 Jul 2026 14:30:57 -0500 Subject: [PATCH 3/4] fix(ci): await Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/fork-pr-comment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fork-pr-comment.yml b/.github/workflows/fork-pr-comment.yml index a32c2cfc4c..81494e2c2b 100644 --- a/.github/workflows/fork-pr-comment.yml +++ b/.github/workflows/fork-pr-comment.yml @@ -16,7 +16,7 @@ jobs: uses: actions/github-script@v7 with: script: | - github.rest.issues.createComment({ + await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, @@ -35,4 +35,4 @@ jobs: '', 'Since this pull request won't be able to be assessed and merged, you are welcome to close it when you have opened a new pull request from a branch in the repository.', ].join('\n') - }) + }); From 3e8e9128adb0843653037977640b9fd72b10da1d Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 18 Aug 2026 11:53:25 -0500 Subject: [PATCH 4/4] fix: rewording Co-authored-by: Derek M Anderson --- .github/workflows/fork-pr-comment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fork-pr-comment.yml b/.github/workflows/fork-pr-comment.yml index 81494e2c2b..7cf8e1e120 100644 --- a/.github/workflows/fork-pr-comment.yml +++ b/.github/workflows/fork-pr-comment.yml @@ -25,9 +25,9 @@ jobs: '', 'We noticed that this PR was submitted from a fork. For the best experience with our CI system, we recommend contributing from a branch directly inside the **eic/EICrecon** repository.', '', - 'To do so, please consider:', - '1. Becoming a member of the [**eic** organization](https://github.com/eic)', - '2. Joining the **ePIC Devs** team within the organization', + 'To do so, please:', + '1. Become a member of the [**eic** organization](https://github.com/eic)', + '2. Join the **ePIC Devs** team within the organization', '', 'Visit [github.com/eic](https://github.com/eic) for more information and instructions on how to join.', '',