We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58933e7 commit f0a805aCopy full SHA for f0a805a
1 file changed
.github/workflows/warn_main_pr.yml
@@ -0,0 +1,27 @@
1
+name: Warn PR targets main
2
+
3
+on:
4
+ pull_request_target:
5
+ types: [opened, edited]
6
+ branches:
7
+ - main
8
9
+jobs:
10
+ warn:
11
+ if: github.repository_owner == 'loopandlearn'
12
+ runs-on: ubuntu-latest
13
14
+ permissions:
15
+ pull-requests: write
16
17
+ steps:
18
+ - name: Comment on PR
19
+ uses: actions/github-script@v7
20
+ with:
21
+ script: |
22
+ await github.rest.issues.createComment({
23
+ owner: context.repo.owner,
24
+ repo: context.repo.repo,
25
+ issue_number: context.payload.pull_request.number,
26
+ body: '⚠️ This PR targets the `main` branch. We do not accept PRs directly to `main` — please retarget your PR to the `dev` branch instead.'
27
+ });
0 commit comments