Skip to content

Commit d09e9c6

Browse files
authored
Merge pull request #70 from peter-evans/dev
v2
2 parents 4a930f9 + 58e77de commit d09e9c6

32 files changed

+9499
-27513
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/
2+
lib/
3+
node_modules/

.eslintrc.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
{
2-
"env": {
3-
"commonjs": true,
4-
"es6": true,
5-
"node": true
6-
},
7-
"extends": "eslint:recommended",
8-
"globals": {
9-
"Atomics": "readonly",
10-
"SharedArrayBuffer": "readonly"
11-
},
12-
"parserOptions": {
13-
"ecmaVersion": 2018
14-
},
15-
"rules": {
16-
}
17-
}
2+
"env": { "node": true, "jest": true },
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": { "ecmaVersion": 9, "sourceType": "module" },
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:@typescript-eslint/eslint-recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:import/errors",
10+
"plugin:import/warnings",
11+
"plugin:import/typescript",
12+
"plugin:prettier/recommended",
13+
"prettier/@typescript-eslint"
14+
],
15+
"plugins": ["@typescript-eslint"],
16+
"rules": {
17+
"@typescript-eslint/camelcase": "off"
18+
}
19+
}

.github/slash-command-dispatch.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@
33
"command": "create",
44
"permission": "write",
55
"issue_type": "issue",
6-
"event_type_suffix": "-cmd",
7-
"named_args": true
6+
"event_type_suffix": "-cmd"
87
},
98
{
109
"command": "delete",
1110
"permission": "write",
1211
"issue_type": "both",
13-
"allow_edits": true
12+
"allow_edits": true,
13+
"static_args": [
14+
"some-unnamed-arg",
15+
"foo=bar"
16+
]
17+
},
18+
{
19+
"command": "update",
20+
"permission": "write",
21+
"issue_type": "issue",
22+
"dispatch_type": "workflow"
1423
},
1524
{
1625
"command": "do-something-remotely",

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ jobs:
1919
with:
2020
node-version: 12.x
2121
- run: npm ci
22+
- run: npm run build
23+
- run: npm run format-check
24+
- run: npm run lint
2225
- run: npm run test
23-
- run: npm run package
2426
- uses: actions/upload-artifact@v2
2527
with:
2628
name: dist
@@ -37,11 +39,9 @@ jobs:
3739
name: dist
3840
path: dist
3941
- name: Create Pull Request
40-
uses: peter-evans/create-pull-request@v2
42+
uses: peter-evans/create-pull-request@v3
4143
with:
4244
commit-message: Update distribution
43-
committer: GitHub <noreply@github.com>
44-
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
4545
title: Update distribution
4646
body: |
4747
- Updates the distribution for changes on `master`

.github/workflows/ping-command.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
with:
1212
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
1313
body: |
14-
>pong ${{ github.event.client_payload.slash_command.args }}
14+
>pong ${{ github.event.client_payload.slash_command.args.all }}
1515
reaction-type: hooray

.github/workflows/slash-command-dispatch.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
uses: ./
1919
with:
2020
token: ${{ secrets.REPO_ACCESS_TOKEN }}
21-
commands: hello-world-local, ping-local
21+
commands: |
22+
hello-world-local
23+
ping-local
2224
permission: none
2325
issue-type: issue
2426

@@ -67,6 +69,19 @@ jobs:
6769
"repository": "peter-evans/slash-command-dispatch-processor",
6870
"event_type_suffix": "-pr-command"
6971
},
72+
{
73+
"command": "hello-workflow",
74+
"permission": "none",
75+
"issue_type": "issue",
76+
"repository": "peter-evans/slash-command-dispatch-processor",
77+
"static_args": [
78+
"repository=${{ github.repository }}",
79+
"comment-id=${{ github.event.comment.id }}",
80+
"issue-number=${{ github.event.issue.number }}",
81+
"actor=${{ github.actor }}"
82+
],
83+
"dispatch_type": "workflow"
84+
},
7085
{
7186
"command": "ping",
7287
"permission": "none",

.github/workflows/update-dep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
npx -p npm-check-updates ncu -u
1616
npm install
1717
- name: Create Pull Request
18-
uses: peter-evans/create-pull-request@v2
18+
uses: peter-evans/create-pull-request@v3
1919
with:
2020
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
2121
commit-message: Update dependencies

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
lib/
2+
node_modules/

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/
2+
lib/
3+
node_modules/

.prettierrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": false,
6+
"singleQuote": true,
7+
"trailingComma": "none",
8+
"bracketSpacing": false,
9+
"arrowParens": "avoid",
10+
"parser": "typescript"
11+
}

0 commit comments

Comments
 (0)