mirror of https://github.com/actions/toolkit
Fix code in docs
parent
99fffe8b48
commit
e6c3ae7c3a
|
@ -76,7 +76,7 @@ There may be cases where multiple events have a field you need. For example, we
|
||||||
```js
|
```js
|
||||||
const github = require('@actions/github');
|
const github = require('@actions/github');
|
||||||
const payload = github.context.payload
|
const payload = github.context.payload
|
||||||
if ("issue" in payload) {
|
if (payload && "issue" in payload) {
|
||||||
core.info(`The issue number is: ${JSON.stringify(payload.issue.number)}`)
|
core.info(`The issue number is: ${JSON.stringify(payload.issue.number)}`)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue