Skip to content

Commit a89626d

Browse files
committed
Initial commit
0 parents  commit a89626d

8 files changed

+18155
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2012-2022 Scott Chacon and others
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
## PullApprove alternative that runs entirely inside GitHub Actions.
2+
it use same .pullapprove.yml configuration, no need to change anything.
3+
4+
Just create a workflow and call the step, eg:
5+
6+
```yml
7+
# .github/workflows/code-review.yml
8+
name: Update CR Status
9+
on:
10+
pull_request_review:
11+
types: [submitted, edited, dismissed]
12+
pull_request:
13+
types: [synchronize, opened]
14+
jobs:
15+
cr:
16+
runs-on: ubuntu-latest
17+
name: Update CR Status
18+
steps:
19+
- name: Run CR Status
20+
uses: mgiachetti/pullapprove-alt@master
21+
with:
22+
github-token: ${{ secrets.CR_GITHUB_TOKEN }}
23+
```
24+
secrets.GITHUB_TOKEN is a [Personal access token](https://github.com/settings/tokens) with this permission:
25+
- repo
26+
- read:org (for teams)
27+
28+
features:
29+
- [x] overrides
30+
- [x] if
31+
- [x] status
32+
- [x] explanation
33+
- [x] pullapprove_conditions
34+
- [x] condition
35+
- [x] unmet_status
36+
- [x] explanation
37+
- [x] groups
38+
- [x] type
39+
- [x] required
40+
- [ ] optional
41+
- [x] conditions
42+
- [x] reviewers
43+
- [x] users
44+
- [x] teams
45+
- [x] reviews
46+
- [x] required
47+
- [ ] request
48+
- [ ] request_order
49+
- [ ] reviewed_for
50+
- [ ] description
51+
- [ ] labels
52+
- [x] meta
53+
- [ ] notifications
54+
- [ ] extends
55+
- [ ] github_api_version
56+
- [x] meta
57+
58+
Conditions:
59+
- [x] `base.ref != 'branch'`
60+
- [x] `base.ref == 'branch'`
61+
- [x] `'some-label' in labels`
62+
- [x] `'some-label' not in labels`
63+
- [x] `some-cond or some-cond`
64+
- eg: `'some-label' in labels or 'other-label' in labels`
65+
- [x] `'text' in title`
66+
- [x] `'text' not in title`
67+
- [x] `'.some-file' in files`
68+
- [x] `'app/*' in files`
69+
- [x] `'*.js' in files`
70+
- [ ] `'*travis*' not in statuses.successful`
71+
- [ ] `'global' not in groups.approved`
72+
- [ ] `not commits.are_signed_off`
73+
- [ ] `author_association == 'FIRST_TIME_CONTRIBUTOR'`
74+
- [ ] `len(groups.active) == 0`
75+
- [ ] `len(groups.active) < 1`
76+

action.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'PA alt'
2+
description: 'Adds Code Review Process validations'
3+
inputs:
4+
github-token:
5+
description: 'The token to use to access the GitHub API'
6+
required: true
7+
runs:
8+
using: 'node16'
9+
main: 'dist/index.js'

0 commit comments

Comments
 (0)