Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/fork-pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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
Comment thread
wdconinc marked this conversation as resolved.
steps:
- name: Post comment
uses: actions/github-script@v7
with:
script: |
await 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',
Comment thread
wdconinc marked this conversation as resolved.
Outdated
'',
'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.',
Comment thread
wdconinc marked this conversation as resolved.
'',
'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')
});
Loading