accept-to-ship-action 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +78 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,6 +9,84 @@ Want to merge a Pull Request automatically after someone approved it? Set up thi
9
9
 
10
10
  ## Examples
11
11
 
12
+ If auto-merge is enabled for a repository it's better to let this Action use auto-merge:
13
+
14
+ ```yaml
15
+ name: Ship
16
+
17
+ on:
18
+ pull_request:
19
+ types:
20
+ [
21
+ labeled,
22
+ unlabeled,
23
+ edited,
24
+ closed,
25
+ reopened,
26
+ synchronize,
27
+ review_requested,
28
+ review_request_removed,
29
+ ]
30
+ pull_request_review:
31
+ types: [submitted, edited, dismissed]
32
+
33
+ concurrency:
34
+ group: ${{ github.event.pull_request.number || github.workflow }}
35
+ cancel-in-progress: true
36
+
37
+ jobs:
38
+ accept_to_ship:
39
+ name: Accept to Ship
40
+ if: |-
41
+ ${{
42
+ github.base_ref == 'main' ||
43
+ github.event.pull_request.base.ref == 'main' ||
44
+ contains(github.event.check_run.pull_requests.*.base.ref, 'main') ||
45
+ contains(github.event.check_suite.pull_requests.*.base.ref, 'main') ||
46
+ contains(github.event.workflow_run.pull_requests.*.base.ref, 'main')
47
+ }}
48
+ runs-on: ubuntu-latest
49
+ permissions:
50
+ pull-requests: write
51
+ contents: write
52
+ steps:
53
+ - uses: actions/checkout@v3
54
+
55
+ - uses: CatChen/accept-to-ship-action@v0.7
56
+ with:
57
+ github-token: ${{ secrets.GITHUB_TOKEN }} # optional
58
+ merge-method: merge # optional
59
+ timeout: 0 # optional
60
+ checks-watch-interval: 10 # optional
61
+ fail-if-timeout: false # optional
62
+ request-zero-accept-zero: false # optional
63
+ custom-hashtag: '#accept2ship' # optional
64
+ use-auto-merge: true
65
+
66
+ pass-to-ship:
67
+ name: Pass to Ship
68
+ if: |-
69
+ ${{
70
+ github.base_ref == 'main' ||
71
+ github.event.pull_request.base.ref == 'main' ||
72
+ contains(github.event.check_run.pull_requests.*.base.ref, 'main') ||
73
+ contains(github.event.check_suite.pull_requests.*.base.ref, 'main') ||
74
+ contains(github.event.workflow_run.pull_requests.*.base.ref, 'main')
75
+ }}
76
+ runs-on: ubuntu-latest
77
+ permissions: write-all
78
+ steps:
79
+ - uses: actions/checkout@v3
80
+
81
+ - uses: CatChen/accept-to-ship-action@v0.7
82
+ with:
83
+ request-zero-accept-zero: true
84
+ custom-hashtag: '#pass2ship'
85
+ use-auto-merge: true
86
+ ```
87
+
88
+ Otherwise, this Action can wait for checks and trigger the merge by itself:
89
+
12
90
  ```yaml
13
91
  name: Ship
14
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accept-to-ship-action",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.js",