suzuki-shunsuke/PR Diff
Get diff of a pull request via GitHub API with git fallback
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| pr_number | Pull Request number. If empty, the action falls back to `github.event.pull_request.number`. | no | — |
| repository | A target repository in the `owner/repo` format. | no | ${{ github.repository }} |
| github_token | GitHub Access Token. `contents:read` and `pull-requests:read` are required. It is also used for authentication when fetching commits in the git fallback path. | no | ${{ github.token }} |
| github_api_url | GitHub API base URL. Useful for GitHub Enterprise Server. | no | ${{ github.api_url }} |
| output_path | Path to write the diff to. If empty, the action writes the diff to a temporary file under `os.tmpdir()`. | no | — |
| working_directory | Working directory for the git fallback. If empty, `process.cwd()` is used. If the directory is a Git repository, the action fetches commits into it; otherwise a temporary directory is created. | no | — |
Outputs
| name | description |
|---|---|
| diff_path | Path to the file containing the pull request diff. |
| size | Size of the diff in bytes. |