You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ Using JSON configuration allows the options for each command to be specified ind
87
87
88
88
Note that it's recommended to write the JSON configuration directly in the workflow rather than use a file. Using the `config-from-file` input will be slightly slower due to requiring the repository to be checked out with `actions/checkout` so the file can be accessed.
89
89
90
-
Here is an example workflow. Take care to use the correct property names. The JSON property names differ from the action inputs by using underscores in place of hyphens.
90
+
Here is an example workflow. Take care to use the correct JSON property names.
91
91
92
92
```yml
93
93
name: Slash Command Dispatch
@@ -127,7 +127,7 @@ jobs:
127
127
]
128
128
```
129
129
130
-
An example using the `config-from-file` input to set JSON configuration.
130
+
The following workflow is an example using the `config-from-file` input to set JSON configuration.
131
131
Note that `actions/checkout` is required to access the file.
132
132
133
133
```yml
@@ -161,7 +161,13 @@ on:
161
161
types: [integration-test-command]
162
162
```
163
163
164
-
### Accessing command arguments
164
+
### Accessing command contexts
165
+
166
+
Commands are dispatched with a payload containing a number of contexts.
167
+
168
+
The slash command context can be accessed as follows.
169
+
`args`is a space separated string of all the supplied arguments.
170
+
Each argument is also supplied in a numbered property, i.e. `arg1`, `arg2`, `arg3`, etc.
165
171
166
172
```yml
167
173
- name: Output command and arguments
@@ -174,6 +180,17 @@ on:
174
180
# etc.
175
181
```
176
182
183
+
The payload contains the complete `github` context of the `issue_comment` event at path `github.event.client_payload.github`.
184
+
Additionally, if the comment was made in a pull request, the action calls the [GitHub API to fetch the pull request detail](https://developer.github.com/v3/pulls/#get-a-single-pull-request) and attach it to the payload at path `github.event.client_payload.pull_request`.
185
+
186
+
You can inspect the payload with the following step.
0 commit comments