forked from the-turing-way/teams-as-code
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 1.11 KB
/
fork-warn.yaml
File metadata and controls
34 lines (29 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Warn about PRs from forks via comment
on:
pull_request_target:
branches:
- main
types:
- opened
- reopened
jobs:
warn-forks:
runs-on: ubuntu-latest
if: github.event.pull_request_target.head.repo.full_name != 'the-turing-way/teams-as-code'
permissions:
issues: write
pull-requests: write
steps:
- name: Post comment
uses: peter-evans/create-or-update-comment@v5
with:
issue-number: ${{ github.event.number }}
body: >-
Oh no! It seems you've opened this Pull Request from a fork :frowning_face:
So you know, the tests will likely fail because they require secrets,
which aren't available when workflows run from forks. Please reopen your
Pull Request from a branch of this repository.
If you don't have write access to this repository, because you aren't
yet a member of a team, please ask someone from the team you are trying
to update to open the Pull Request on your behalf.
Thank you for keeping our teams up-to-date!