Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 #70

Merged
merged 33 commits into from
Jul 25, 2020
Merged

v2 #70

Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ad9cf8d
Convert to typescript
peter-evans Jul 20, 2020
dde6684
Truncate body context properties
peter-evans Jul 20, 2020
9a49db7
Updated dependencies
peter-evans Jul 20, 2020
0849c83
Refactor slash_command context and remove named-args input
peter-evans Jul 21, 2020
50fbe8b
Allow commands input to be newline separated
peter-evans Jul 21, 2020
77db62f
Add static arguments
peter-evans Jul 21, 2020
27e527b
Update documentation
peter-evans Jul 21, 2020
d560454
Add dispatch-type and support for workflow dispatch
peter-evans Jul 22, 2020
6ce42ea
Permit hyphens in named arg keys
peter-evans Jul 22, 2020
54bdc6a
Set input validation errors to action warnings
peter-evans Jul 22, 2020
e11ed23
Fix context ref
peter-evans Jul 22, 2020
84cfb23
Set error-message output for workflow validation errors
peter-evans Jul 22, 2020
07cb140
Update documentation
peter-evans Jul 22, 2020
dc8f860
Add hello-workflow command
peter-evans Jul 22, 2020
ce4c3e7
Remove comments
peter-evans Jul 22, 2020
d00afdd
Fix test
peter-evans Jul 22, 2020
f04fe36
Update new features doc
peter-evans Jul 22, 2020
f59323b
Update documentation
peter-evans Jul 22, 2020
894f0fb
Update documentation
peter-evans Jul 22, 2020
543843b
Update readme
peter-evans Jul 22, 2020
6251f5e
Add support for quoted arguments
peter-evans Jul 23, 2020
464b7e3
Update documentation
peter-evans Jul 23, 2020
192b73b
Update documentation
peter-evans Jul 23, 2020
17a439d
Update cpr to v3
peter-evans Jul 23, 2020
2296beb
Add a diff for the slash_command context change
peter-evans Jul 24, 2020
9604e4d
Add explanation of dispatch type differences
peter-evans Jul 24, 2020
296463b
Disable eslint warnings for specific lines
peter-evans Jul 24, 2020
95b8faa
Add handling for additional workflow dispatch errors
peter-evans Jul 24, 2020
1ae2a3c
Update documentation
peter-evans Jul 24, 2020
31be627
Update documentation
peter-evans Jul 24, 2020
0abbfd3
Update documentation
peter-evans Jul 24, 2020
1b4c45c
Update documentation
peter-evans Jul 24, 2020
58e77de
Update documentation
peter-evans Jul 25, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
lib/
node_modules/
34 changes: 18 additions & 16 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
}
}
"env": { "node": true, "jest": true },
"parser": "@typescript-eslint/parser",
"parserOptions": { "ecmaVersion": 9, "sourceType": "module" },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/camelcase": "off"
}
}
15 changes: 12 additions & 3 deletions .github/slash-command-dispatch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@
"command": "create",
"permission": "write",
"issue_type": "issue",
"event_type_suffix": "-cmd",
"named_args": true
"event_type_suffix": "-cmd"
},
{
"command": "delete",
"permission": "write",
"issue_type": "both",
"allow_edits": true
"allow_edits": true,
"static_args": [
"some-unnamed-arg",
"foo=bar"
]
},
{
"command": "update",
"permission": "write",
"issue_type": "issue",
"dispatch_type": "workflow"
},
{
"command": "do-something-remotely",
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
with:
node-version: 12.x
- run: npm ci
- run: npm run build
- run: npm run format-check
- run: npm run lint
- run: npm run test
- run: npm run package
- uses: actions/upload-artifact@v2
with:
name: dist
Expand All @@ -37,11 +39,9 @@ jobs:
name: dist
path: dist
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update distribution
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: Update distribution
body: |
- Updates the distribution for changes on `master`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ping-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
with:
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: |
>pong ${{ github.event.client_payload.slash_command.args }}
>pong ${{ github.event.client_payload.slash_command.args.all }}
reaction-type: hooray
17 changes: 16 additions & 1 deletion .github/workflows/slash-command-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
uses: ./
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
commands: hello-world-local, ping-local
commands: |
hello-world-local
ping-local
permission: none
issue-type: issue

Expand Down Expand Up @@ -67,6 +69,19 @@ jobs:
"repository": "peter-evans/slash-command-dispatch-processor",
"event_type_suffix": "-pr-command"
},
{
"command": "hello-workflow",
"permission": "none",
"issue_type": "issue",
"repository": "peter-evans/slash-command-dispatch-processor",
"static_args": [
"repository=${{ github.repository }}",
"comment-id=${{ github.event.comment.id }}",
"issue-number=${{ github.event.issue.number }}",
"actor=${{ github.actor }}"
],
"dispatch_type": "workflow"
},
{
"command": "ping",
"permission": "none",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
npx -p npm-check-updates ncu -u
npm install
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
commit-message: Update dependencies
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
lib/
node_modules/
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
lib/
node_modules/
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
}
133 changes: 87 additions & 46 deletions README.md

Large diffs are not rendered by default.

Loading