Skip to content

Commit dccb72d

Browse files
committed
Turn off autodetect manual merge
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 29fbed2 commit dccb72d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

integrations/git_test.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"math/rand"
1212
"net/http"
1313
"net/url"
14-
"os"
1514
"path"
1615
"path/filepath"
1716
"strconv"
@@ -460,15 +459,17 @@ func doMergeFork(ctx, baseCtx APITestContext, baseBranch, headBranch string) fun
460459
resp := ctx.Session.MakeRequestNilResponseHashSumRecorder(t, req, http.StatusOK)
461460
diffHash = string(resp.Hash.Sum(nil))
462461
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-
}
470462
})
471463

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+
472473
// Now: Merge the PR & make sure that doesn't break the PR page or change its diff
473474
t.Run("MergePR", doAPIMergePullRequest(baseCtx, baseCtx.Username, baseCtx.Reponame, pr.Index))
474475
t.Run("EnsureCanSeePull", doEnsureCanSeePull(baseCtx, pr))

0 commit comments

Comments
 (0)