diff --git a/dist/index.js b/dist/index.js index aff221f87..01dfa96ba 100644 --- a/dist/index.js +++ b/dist/index.js @@ -311,6 +311,9 @@ function createPullRequest(inputs) { return __awaiter(this, void 0, void 0, function* () { let gitAuthHelper; try { + if (!inputs.token) { + throw new Error(`Input 'token' not supplied. Unable to continue.`); + } // Get the repository path const repoPath = utils.getRepoPath(inputs.path); // Create a git command manager diff --git a/src/create-pull-request.ts b/src/create-pull-request.ts index 1e42c1f5a..3fa3ec218 100644 --- a/src/create-pull-request.ts +++ b/src/create-pull-request.ts @@ -35,6 +35,10 @@ export interface Inputs { export async function createPullRequest(inputs: Inputs): Promise { let gitAuthHelper try { + if (!inputs.token) { + throw new Error(`Input 'token' not supplied. Unable to continue.`) + } + // Get the repository path const repoPath = utils.getRepoPath(inputs.path) // Create a git command manager