We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4768300 + 4404120 commit d910cb8Copy full SHA for d910cb8
README.md
@@ -92,3 +92,29 @@ jobs:
92
93
await github.issues.createComment({...context.issue, body: 'Welcome, new contributor!'})
94
```
95
+
96
+### Download data from a URL
97
98
+You can use the `github` object to access the Octokit API. For
99
+instance, `github.request`
100
101
+```
102
+on:
103
+ pull_request
104
105
+jobs:
106
+ diff:
107
+ runs-on: ubuntu-latest
108
+ steps:
109
+ - uses: actions/github-script@0.2.0
110
+ with:
111
+ github-token: ${{github.token}}
112
+ script: |
113
+ const diff_url = context.payload.pull_request.diff_url
114
+ const result = await github.request( diff_url )
115
+ console.log( result )
116
117
118
119
+This will print the full diff object in the screen; `result.data` will
120
+contain the actual diff text.
0 commit comments