Skip to content

Using the API to download diff from private project #282

Open
@asudhak

Description

@asudhak

The README has a good example to obtain the diff of a given pull request using
const diff_url = context.payload.pull_request.diff_url

However, there's a note that says "(Note that this particular example only works for a public URL, where the diff URL is publicly accessible. Getting the diff for a private URL requires using the API.)"

What does using the API mean ? How do I add credentials to the github oktokit client to allow it to fetch the diff URL from my private repo ? The diff_url I'm trying to access is part of the same project in which the workflow runs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionA question on how to use this action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions