@@ -39,14 +39,18 @@ export default class Ready extends AuthCommand {
39
39
this . initGitService ( ) ,
40
40
] ) ;
41
41
42
+ const shouldUndo = flags . undo ;
43
+
44
+ if ( ! shouldUndo ) {
45
+ this . log ( chalk . dim ( "(Use --undo flag to undo this action)" ) ) ;
46
+ }
47
+
42
48
const projectKey = await this . resolveProjectKey ( jira ) ;
43
49
44
50
await this . handlePullRequestExistance ( git ) ;
45
51
46
52
const issue = await this . resolveIssue ( jira , git , projectKey ) ;
47
53
48
- const shouldUndo = flags . undo ;
49
-
50
54
const transition = issue
51
55
? await this . resolveIssueTransition ( jira , shouldUndo , issue )
52
56
: undefined ;
@@ -61,15 +65,6 @@ export default class Ready extends AuthCommand {
61
65
62
66
await this . handleWhatsNext ( jira , git , issue ) ;
63
67
64
- if ( ! shouldUndo ) {
65
- this . log ( ) ;
66
- this . log (
67
- chalk . dim (
68
- "Hint: You can use the --undo flag with the ready command to undo this action."
69
- )
70
- ) ;
71
- }
72
-
73
68
this . log ( ) ;
74
69
}
75
70
@@ -110,8 +105,6 @@ export default class Ready extends AuthCommand {
110
105
this . open ( issueUrl ) ;
111
106
break ;
112
107
}
113
-
114
- this . log ( ) ;
115
108
}
116
109
117
110
private getSequencer (
@@ -284,15 +277,21 @@ export default class Ready extends AuthCommand {
284
277
) ?? null ;
285
278
}
286
279
287
- if ( ! transition ) {
280
+ if ( ! transitionStatus ) {
281
+ this . log ( chalk . yellow ( "!" ) , "No issue status found." ) ;
282
+ }
283
+
284
+ if ( transitionStatus && ! transition ) {
288
285
this . log (
289
286
chalk . yellow ( "!" ) ,
290
287
format (
291
- "The issue status %s is no longer available for this issue ." ,
288
+ "The issue status %s is no longer available." ,
292
289
chalk . cyan ( transitionStatus )
293
290
)
294
291
) ;
292
+ }
295
293
294
+ if ( ! transition ) {
296
295
transition = await chooseTransition ( filteredTransitions ) ;
297
296
298
297
if ( ! transition . name ) {
0 commit comments