Skip to content

Commit

Permalink
add fork_full_name
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed Jun 23, 2022
1 parent c70a82f commit 6b08e74
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ As seen above, we have two steps. One for a noop deploy, and one for a regular d
| fork_ref | The true ref of the fork |
| fork_label | The API label field returned for the fork |
| fork_checkout | The console command presented in the GitHub UI to checkout a given fork locally |
| fork_full_name | The full name of the fork in "org/repo" format |

## Custom Deployment Messages ✏️

Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ outputs:
description: 'The API label field returned for the fork'
fork_checkout:
description: 'The console command presented in the GitHub UI to checkout a given fork locally'
fork_full_name:
description: 'The full name of the fork in "org/repo" format'
runs:
using: "node16"
main: "dist/index.js"
Expand Down
3 changes: 3 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/functions/prechecks.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ export async function prechecks(
const label = pr.data.head.label
const forkRef = pr.data.head.ref
const forkCheckout = `${label.replace(':', '-')} ${forkRef}`
const forkFullName = pr.data.head.repo.full_name
core.setOutput('fork_ref', forkRef)
core.setOutput('fork_label', label)
core.setOutput('fork_checkout', forkCheckout)
core.setOutput('fork_full_name', forkFullName)
core.debug(`fork_ref: ${forkRef}`)
core.debug(`fork_label: ${label}`)
core.debug(`fork_checkout: ${forkCheckout}`)
core.debug(`fork_full_name: ${forkFullName}`)

// If this pull request is a fork, use the exact SHA rather than the branch name
ref = pr.data.head.sha
Expand Down

0 comments on commit 6b08e74

Please sign in to comment.