Skip to content

Commit 2b011fa

Browse files
authored
fix: add check for missing token input (#1324)
1 parent 331d02c commit 2b011fa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

dist/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ function createPullRequest(inputs) {
311311
return __awaiter(this, void 0, void 0, function* () {
312312
let gitAuthHelper;
313313
try {
314+
if (!inputs.token) {
315+
throw new Error(`Input 'token' not supplied. Unable to continue.`);
316+
}
314317
// Get the repository path
315318
const repoPath = utils.getRepoPath(inputs.path);
316319
// Create a git command manager

src/create-pull-request.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ export interface Inputs {
3535
export async function createPullRequest(inputs: Inputs): Promise<void> {
3636
let gitAuthHelper
3737
try {
38+
if (!inputs.token) {
39+
throw new Error(`Input 'token' not supplied. Unable to continue.`)
40+
}
41+
3842
// Get the repository path
3943
const repoPath = utils.getRepoPath(inputs.path)
4044
// Create a git command manager

0 commit comments

Comments
 (0)