-
-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { ActionInterface } from './constants'; | ||
import { ActionInterface, Status } from './constants'; | ||
export declare function init(action: ActionInterface): Promise<void | Error>; | ||
export declare function switchToBaseBranch(action: ActionInterface): Promise<void>; | ||
export declare function generateBranch(action: ActionInterface): Promise<void>; | ||
export declare function deploy(action: ActionInterface): Promise<void>; | ||
export declare function deploy(action: ActionInterface): Promise<Status>; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.suppressSensitiveInformation = exports.hasRequiredParameters = exports.generateRepositoryPath = exports.generateTokenType = exports.isNullOrUndefined = void 0; | ||
const core_1 = require("@actions/core"); | ||
/* Utility function that checks to see if a value is undefined or not. */ | ||
exports.isNullOrUndefined = (value) => typeof value === 'undefined' || value === null || value === ''; | ||
|
@@ -10,7 +11,7 @@ exports.generateTokenType = (action) => action.ssh | |
? 'Access Token' | ||
: action.gitHubToken | ||
? 'GitHub Token' | ||
: '...'; | ||
: '…'; | ||
/* Generates a the repository path used to make the commits. */ | ||
exports.generateRepositoryPath = (action) => action.ssh | ||
? `[email protected]:${action.repositoryName}` | ||
|
@@ -20,7 +21,8 @@ exports.hasRequiredParameters = (action) => { | |
if ((exports.isNullOrUndefined(action.accessToken) && | ||
exports.isNullOrUndefined(action.gitHubToken) && | ||
exports.isNullOrUndefined(action.ssh)) || | ||
exports.isNullOrUndefined(action.repositoryPath)) { | ||
exports.isNullOrUndefined(action.repositoryPath) || | ||
(action.accessToken && action.accessToken === '')) { | ||
throw new Error('No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true.'); | ||
} | ||
if (exports.isNullOrUndefined(action.branch)) { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.