mirror of
https://github.com/actions/github-script.git
synced 2025-12-08 16:16:21 +00:00
Make some minor changes to README
This commit is contained in:
@@ -33,7 +33,7 @@ jobs:
|
|||||||
comment:
|
comment:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@0.2.0
|
- uses: actions/github-script@0.3.0
|
||||||
with:
|
with:
|
||||||
github-token: ${{github.token}}
|
github-token: ${{github.token}}
|
||||||
script: |
|
script: |
|
||||||
@@ -98,7 +98,7 @@ jobs:
|
|||||||
You can use the `github` object to access the Octokit API. For
|
You can use the `github` object to access the Octokit API. For
|
||||||
instance, `github.request`
|
instance, `github.request`
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
on:
|
on:
|
||||||
pull_request
|
pull_request
|
||||||
|
|
||||||
@@ -111,9 +111,8 @@ jobs:
|
|||||||
github-token: ${{github.token}}
|
github-token: ${{github.token}}
|
||||||
script: |
|
script: |
|
||||||
const diff_url = context.payload.pull_request.diff_url
|
const diff_url = context.payload.pull_request.diff_url
|
||||||
const result = await github.request( diff_url )
|
const result = await github.request(diff_url)
|
||||||
console.log( result )
|
console.log(result)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This will print the full diff object in the screen; `result.data` will
|
This will print the full diff object in the screen; `result.data` will
|
||||||
|
|||||||
Reference in New Issue
Block a user