File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ const TestDetailsModal: React.FunctionComponent<{
157157 < Button
158158 color = "inherit"
159159 onClick = { ( ) =>
160- testRunService . approve ( testRun . id ) . then ( ( testRun ) => {
160+ testRunService . approve ( testRun . id , testRun . merge ) . then ( ( testRun ) => {
161161 updateTestRun ( testRunDispatch , testRun ) ;
162162 } )
163163 }
Original file line number Diff line number Diff line change @@ -50,15 +50,16 @@ function recalculateDiff(id: string): Promise<TestRun> {
5050 ) . then ( handleResponse ) ;
5151}
5252
53- function approve ( id : string ) : Promise < TestRun > {
53+ function approve ( id : string , merge : boolean ) : Promise < TestRun > {
5454 const requestOptions = {
5555 method : "GET" ,
5656 headers : authHeader ( ) ,
5757 } ;
5858
59- return fetch ( `${ API_URL } ${ ENDPOINT_URL } /approve/${ id } ` , requestOptions ) . then (
60- handleResponse
61- ) ;
59+ return fetch (
60+ `${ API_URL } ${ ENDPOINT_URL } /approve?id=${ id } &merge=${ merge } ` ,
61+ requestOptions
62+ ) . then ( handleResponse ) ;
6263}
6364
6465function reject ( id : string ) : Promise < TestRun > {
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ export interface TestRun {
1919 comment ?: string ;
2020 branchName : string ;
2121 baselineBranchName : string ;
22+ merge : boolean ;
2223}
You can’t perform that action at this time.
0 commit comments