@@ -11,7 +11,6 @@ import (
11
11
"math/rand"
12
12
"net/http"
13
13
"net/url"
14
- "os"
15
14
"path"
16
15
"path/filepath"
17
16
"strconv"
@@ -460,15 +459,17 @@ func doMergeFork(ctx, baseCtx APITestContext, baseBranch, headBranch string) fun
460
459
resp := ctx .Session .MakeRequestNilResponseHashSumRecorder (t , req , http .StatusOK )
461
460
diffHash = string (resp .Hash .Sum (nil ))
462
461
diffLength = resp .Length
463
- if diffLength == 0 {
464
- fmt .Fprintf (os .Stdout , "Had to request diff twice due to 0 bytes\n " )
465
- req := NewRequest (t , "GET" , fmt .Sprintf ("/%s/%s/pulls/%d.diff" , url .PathEscape (baseCtx .Username ), url .PathEscape (baseCtx .Reponame ), pr .Index ))
466
- resp := ctx .Session .MakeRequestNilResponseHashSumRecorder (t , req , http .StatusOK )
467
- diffHash = string (resp .Hash .Sum (nil ))
468
- diffLength = resp .Length
469
- }
470
462
})
471
463
464
+ trueBool := true
465
+ falseBool := false
466
+
467
+ t .Run ("AllowSetManuallyMergedAndSwitchOffAutodetectManualMerge" , doAPIEditRepository (baseCtx , & api.EditRepoOption {
468
+ HasPullRequests : & trueBool ,
469
+ AllowManualMerge : & trueBool ,
470
+ AutodetectManualMerge : & falseBool ,
471
+ }))
472
+
472
473
// Now: Merge the PR & make sure that doesn't break the PR page or change its diff
473
474
t .Run ("MergePR" , doAPIMergePullRequest (baseCtx , baseCtx .Username , baseCtx .Reponame , pr .Index ))
474
475
t .Run ("EnsureCanSeePull" , doEnsureCanSeePull (baseCtx , pr ))
0 commit comments