zenhubhq/Get Git SHA for PR or Branch Build
Get Git SHA for PR or Branch Build
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| github_sha | should be github.sha | yes | — |
| github_event_pull_request_head_sha | should be github.event.pull_request.head.sha | yes | — |
| github_event_number | should be github.event.number | yes | — |
| github_event_pull_request_base_ref | should be github.event.pull_request.base.ref | yes | — |
| github_event_ref | should be github.event.ref | yes | — |
| github_head_ref | should be github.head_ref | yes | — |
| github_ref | should be github.ref | yes | — |
Outputs
| name | description |
|---|---|
| sha | if pull request : 'github.event.pull_request.head.sha' else : 'github.sha' |
| isPullRequest | 'true' or 'false' |
| uniqueName | if pull request: 'inputs.github_event_number' else : short 'github.sha' |
| baseBranch | if pull request: 'github.event.pull_request.base.ref' else : short 'github.event.ref' stripped out of 'refs/heads/' |
| currentBranch | if pull request: 'github.event.pull_request.base.ref' else : short 'github.event.ref' stripped out of 'refs/heads/' |