Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adds example that uses the github object #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions 26 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,29 @@ jobs:

await github.issues.createComment({...context.issue, body: 'Welcome, new contributor!'})
```

### Download data from a URL

You can use the `github` object to access the Octokit API. For
instance, `github.request`

```
on:
pull_request

jobs:
diff:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@0.2.0
with:
github-token: ${{github.token}}
script: |
const diff_url = context.payload.pull_request.diff_url
const result = await github.request( diff_url )
console.log( result )

```

This will print the full diff object in the screen; `result.data` will
contain the actual diff text.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.