Skip to content

Commit b603439

Browse files
committed
v1.0.0 release and readme quickstart
1 parent 2e811b7 commit b603439

File tree

2 files changed

+84
-8
lines changed

2 files changed

+84
-8
lines changed

README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,84 @@ This project is inspired by [Prow](https://github.com/kubernetes/test-infra/tree
66
77
## Quickstart
88

9+
Run specified actions or jobs for issue and PR comments through a `workflow.yaml` file:
10+
```yaml
11+
name: "Prow github actions"
12+
on:
13+
issue_comment:
14+
types: [created]
15+
16+
jobs:
17+
execute:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: jpmcb/prow-github-actions
21+
with:
22+
prow-commands: '/assign
23+
/unassign
24+
/approve
25+
/retitle
26+
/area
27+
/kind
28+
/priority
29+
/remove
30+
/lgtm
31+
/close
32+
/reopen
33+
/lock
34+
/milestone
35+
/hold
36+
/cc
37+
/uncc'
38+
github-token: "${{ secrets.GITHUB_TOKEN }}"
39+
```
40+
41+
Automatically label PRs every hour based on your `.github/labels.yaml`:
42+
```yaml
43+
name: "Label PRs from globs"
44+
on:
45+
schedule:
46+
- cron: "0 * * * *"
47+
48+
jobs:
49+
execute:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: jpmcb/prow-github-actions
53+
with:
54+
jobs: 'pr-labeler'
55+
github-token: "${{ secrets.GITHUB_TOKEN }}"
56+
```
57+
58+
Your `.github/labels.yaml` may look like:
59+
```yaml
60+
# labels to be used with /area command
61+
area:
62+
- 'bug'
63+
- 'important'
64+
65+
# File globs for PR labeler
66+
tests:
67+
- '**/*.test.ts'
68+
```
69+
70+
You can automatically merge PRs based on a cron schedule if it contains the `lgtm` label:
71+
```yaml
72+
name: "Merge on lgtm label"
73+
on:
74+
schedule:
75+
- cron: "0 * * * *"
76+
77+
jobs:
78+
execute:
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: jpmcb/prow-github-actions
82+
with:
83+
jobs: 'lgtm'
84+
github-token: "${{ secrets.GITHUB_TOKEN }}"
85+
```
86+
987
## Documentation
1088
- [Overview](./docs/overview.md)
1189
- [Commands](./docs/commands.md)

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
2-
"name": "typescript-action",
3-
"version": "0.0.0",
4-
"private": true,
5-
"description": "TypeScript template action",
2+
"name": "prow-github-actions",
3+
"version": "1.0.0",
4+
"description": "Slash commands, jobs, and chat-ops for Github actions inspired by Kubernetes Prow",
65
"main": "lib/main.js",
76
"scripts": {
87
"build": "tsc",
@@ -16,14 +15,13 @@
1615
},
1716
"repository": {
1817
"type": "git",
19-
"url": "git+https://github.com/actions/typescript-action.git"
18+
"url": "git+https://github.com/jpmcb/prow-github-actions.git"
2019
},
2120
"keywords": [
2221
"actions",
23-
"node",
24-
"setup"
22+
"prow"
2523
],
26-
"author": "YourNameOrOrganization",
24+
"author": "John McBride",
2725
"license": "MIT",
2826
"dependencies": {
2927
"@actions/core": "^1.2.0",

0 commit comments

Comments
 (0)