Skip to content

Commit

Permalink
misc: small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Jan 7, 2025
1 parent eed23a6 commit 3acabfc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const runProgram = async () => {
let storyPoints: Size = issue.fields[jira.fields.storyPoints];
const setStoryPoints = !storyPoints;

if (!storyPoints) {
if (setStoryPoints) {
const answer: SizeWithControls = await select({
message: 'Story Points',
choices: [
Expand Down Expand Up @@ -177,7 +177,7 @@ const runProgram = async () => {
let priority = parsedPriority.success ? parsedPriority.data : undefined;
const setPriority = !priority;

if (!priority) {
if (setPriority) {
const answer: PriorityWithControls = await select({
message: 'Priority',
choices: [
Expand Down Expand Up @@ -236,7 +236,7 @@ const runProgram = async () => {

// This is workaround, We should use api to determine what values are available on the issue
if (
!severity &&
setSeverity &&
issue.fields.issuetype.name !== 'Story' &&
issue.fields.issuetype.name !== 'Task'
) {
Expand Down Expand Up @@ -283,7 +283,7 @@ const runProgram = async () => {

severity = answer;
} else {
setSeverity = !setSeverity;
setSeverity != setSeverity;
}

// If values are already set, skip setting them
Expand Down

0 comments on commit 3acabfc

Please sign in to comment.