File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,16 @@ pub(super) async fn command_try_build(
65
65
. await
66
66
. context ( "Cannot find or create PR" ) ?;
67
67
68
+ if let Some ( build) = & pr_model. try_build {
69
+ if build. status == BuildStatus :: Pending {
70
+ tracing:: warn!( "Try build already in progress" ) ;
71
+ repo. client
72
+ . post_comment ( pr. number , try_build_in_progress_comment ( ) )
73
+ . await ?;
74
+ return Ok ( ( ) ) ;
75
+ }
76
+ }
77
+
68
78
let base_sha = match get_base_sha ( & pr_model, parent) {
69
79
Ok ( Some ( base_sha) ) => base_sha,
70
80
Ok ( None ) => repo
@@ -171,12 +181,7 @@ fn get_base_sha(
171
181
parent : Option < Parent > ,
172
182
) -> Result < Option < CommitSha > , Comment > {
173
183
let last_parent = if let Some ( ref build) = pr_model. try_build {
174
- if build. status == BuildStatus :: Pending {
175
- tracing:: warn!( "Try build already in progress" ) ;
176
- return Err ( try_build_in_progress_comment ( ) ) ;
177
- } else {
178
- Some ( CommitSha ( build. parent . clone ( ) ) )
179
- }
184
+ Some ( CommitSha ( build. parent . clone ( ) ) )
180
185
} else {
181
186
None
182
187
} ;
You can’t perform that action at this time.
0 commit comments