Skip to content

Commit 76f387a

Browse files
authored
Feature/pav 53 block master pull requests (#132)
2 parents b5081b4 + 79b13fb commit 76f387a

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
pull_number: context.payload.pull_request.number,
28+
state: 'closed'
29+
});

0 commit comments

Comments
 (0)