File tree Expand file tree Collapse file tree 2 files changed +44
-21
lines changed
Expand file tree Collapse file tree 2 files changed +44
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : " Scripts"
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ dependabot-approve :
8+ runs-on : ubuntu-latest
9+
10+ if : github.actor == 'dependabot-preview[bot]'
11+ steps :
12+ - uses : actions/github-script@v3
13+ with :
14+ github-token : ${{secrets.GITHUB_TOKEN}}
15+ script : |
16+ github.pulls.createReview({
17+ owner: context.repo.owner,
18+ repo: context.repo.repo,
19+ pull_number: context.issue.number,
20+ event: 'APPROVE'
21+ })
22+
23+ branch-check :
24+ runs-on : ubuntu-latest
25+
26+ if : github.base_ref == 'development' && contains(github.head_ref, '/development')
27+ steps :
28+ - uses : actions/github-script@v3
29+ with :
30+ github-token : ${{secrets.GITHUB_TOKEN}}
31+ script : |
32+ await github.issues.createComment({
33+ owner: context.repo.owner,
34+ repo: context.repo.repo,
35+ issue_number: context.issue.number,
36+ body: "We don't accept pull requests from `development` branch. Please send a pull request from some other branch. Thank You!"
37+ })
38+ await github.pulls.update({
39+ owner: context.repo.owner,
40+ repo: context.repo.repo,
41+ pull_number: context.issue.number,
42+ state: "closed"
43+ })
44+
You can’t perform that action at this time.
0 commit comments