Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add check for missing token input #1324

Merged
merged 1 commit into from Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions dist/index.js
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/create-pull-request.ts
Expand Up @@ -35,6 +35,10 @@ export interface Inputs {
export async function createPullRequest(inputs: Inputs): Promise<void> {
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
Expand Down