We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b5081b4 + 79b13fb commit 76f387aCopy full SHA for 76f387a
1 file changed
.github/workflows/block-master-pr.yml
@@ -0,0 +1,29 @@
1
+name: Block PRs to Master
2
+
3
+on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
8
+jobs:
9
+ block:
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ - name: Comment and close PR
14
+ uses: actions/github-script@v7
15
+ with:
16
+ script: |
17
+ await github.rest.issues.createComment({
18
+ owner: context.repo.owner,
19
+ repo: context.repo.repo,
20
+ issue_number: context.issue.number,
21
+ body: '❌ Pull Requests para master não são permitidos. Utilize a branch develop.'
22
+ });
23
24
+ await github.rest.pulls.update({
25
26
27
+ pull_number: context.payload.pull_request.number,
28
+ state: 'closed'
29
0 commit comments