8000
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.
1 parent e5da67d commit 4418551Copy full SHA for 4418551
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 an 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