Skip to content

Commit

Permalink
Merge pull request #159 from emerson-paiva/main
Browse files Browse the repository at this point in the history
feat: add branchAlias to output
  • Loading branch information
PatrickHeneise authored Jul 1, 2024
2 parents 03056a9 + d4f7ca2 commit 0e97280
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
34 changes: 16 additions & 18 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35626,7 +35626,7 @@ ${pendingInterceptorsFormatter.format(pending)}
_actions_core__WEBPACK_IMPORTED_MODULE_0__.info(
`Retrieving deployment preview for ${githubRepo}/${githubBranch}`
)
const { url, state } = await (0,
const { url, state, branchAlias } = await (0,
_vercel_js__WEBPACK_IMPORTED_MODULE_1__ /* ["default"] */.Z)(
githubRepo,
githubBranch,
Expand All @@ -35641,6 +35641,10 @@ ${pendingInterceptorsFormatter.format(pending)}
'deployment_state',
state
)
_actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput(
'branch_alias',
branchAlias
)

__webpack_async_result__()
} catch (e) {
Expand Down Expand Up @@ -38024,7 +38028,8 @@ ${pendingInterceptorsFormatter.format(pending)}
core.info(`Preview URL: https://${build.url} (${build.state})`)
return {
url: build.url,
state: build.state
state: build.state,
branchAlias: build.meta.branchAlias
}
}

Expand Down Expand Up @@ -38079,8 +38084,7 @@ ${pendingInterceptorsFormatter.format(pending)}
/******/
/************************************************************************/
/******/ /* webpack/runtime/async module */
/******/
;(() => {
/******/ ;(() => {
/******/ var webpackQueues =
typeof Symbol === 'function'
? Symbol('webpack queues')
Expand Down Expand Up @@ -38185,8 +38189,7 @@ ${pendingInterceptorsFormatter.format(pending)}
})()
/******/
/******/ /* webpack/runtime/define property getters */
/******/
;(() => {
/******/ ;(() => {
/******/ // define getter functions for harmony exports
/******/ __nccwpck_require__.d = (exports, definition) => {
/******/ for (var key in definition) {
Expand All @@ -38208,8 +38211,7 @@ ${pendingInterceptorsFormatter.format(pending)}
})()
/******/
/******/ /* webpack/runtime/ensure chunk */
/******/
;(() => {
/******/ ;(() => {
/******/ __nccwpck_require__.f = {}
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
Expand All @@ -38227,8 +38229,7 @@ ${pendingInterceptorsFormatter.format(pending)}
})()
/******/
/******/ /* webpack/runtime/get javascript chunk filename */
/******/
;(() => {
/******/ ;(() => {
/******/ // This function allow to reference async chunks
/******/ __nccwpck_require__.u = (chunkId) => {
/******/ // return url for filenames based on template
Expand All @@ -38239,16 +38240,14 @@ ${pendingInterceptorsFormatter.format(pending)}
})()
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/
;(() => {
/******/ ;(() => {
/******/ __nccwpck_require__.o = (obj, prop) =>
Object.prototype.hasOwnProperty.call(obj, prop)
/******/
})()
/******/
/******/ /* webpack/runtime/make namespace object */
/******/
;(() => {
/******/ ;(() => {
/******/ // define __esModule on exports
/******/ __nccwpck_require__.r = (exports) => {
/******/ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Expand All @@ -38271,10 +38270,9 @@ ${pendingInterceptorsFormatter.format(pending)}
import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0,
-1
) + '/'
/******/
/******/ /* webpack/runtime/import chunk loading */
/******/
;(() => {
/******/
/******/ /* webpack/runtime/import chunk loading */
/******/ ;(() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ const vercelOptions = {
}

core.info(`Retrieving deployment preview for ${githubRepo}/${githubBranch}`)
const { url, state } = await getDeploymentUrl(
const { url, state, branchAlias } = await getDeploymentUrl(
githubRepo,
githubBranch,
vercelOptions
)

core.setOutput('preview_url', url)
core.setOutput('deployment_state', state)
core.setOutput('branch_alias', branchAlias)
3 changes: 2 additions & 1 deletion src/vercel.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default async function getDeploymentUrl(repo, branch, options) {
core.info(`Preview URL: https://${build.url} (${build.state})`)
return {
url: build.url,
state: build.state
state: build.state,
branchAlias: build.meta.branchAlias
}
}

0 comments on commit 0e97280

Please sign in to comment.