Skip to content

Commit

Permalink
Update src/linear-utils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ericelsken committed Jan 1, 2024
1 parent e1844f7 commit d67f57d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/linear-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const LinearFetch = Promise;

function newLinearClient(): LinearClient {
const params: any = {};
console.log('using linear api key', process.env.LINEAR_API_KEY);
const apiKey = process.env.LINEAR_API_KEY;
if (!!apiKey) {
params.apiKey = apiKey;
Expand Down Expand Up @@ -112,14 +111,12 @@ function collectAssigneeIssueIdentifierFromBranchName(

if (gitBranchFormat === '{username}/{issueIdentifier}-{issueTitle}') {
const slashParts = branch.split('/');
console.log('slashParts', slashParts);
if (slashParts.length !== 2) {
throw new Error('IncompatibleBranchFormat');
}
assignee = slashParts[0];

const idTitleParts = slashParts[1].split('-');
console.log('idTitleParts', idTitleParts);
if (idTitleParts.length < 2) {
throw new Error('IncompatibleBranchFormat');
}
Expand Down Expand Up @@ -156,14 +153,12 @@ interface Arguments {
}

let argv = [...process.argv];
console.log('hello from linear-utils.ts', 'initial args', argv);
if (github.context.job) {
argv.push(
core.getInput('command'),
core.getInput('on_create_branch'),
);
}
console.log('real args', argv);

const args = yargs(hideBin(argv))
.command('on-create-branch <branch>', 'Set Linear Issue Assignee and Status for a branch', yargs => {
Expand Down

0 comments on commit d67f57d

Please sign in to comment.