Add workaround to get head branch sha of pulls with deleted head branch #498

Merged
zeripath merged 6 commits from 6543/go-sdk:fix-empty-pull-head-sha into master 2021-03-08 21:15:43 +00:00
Showing only changes of commit ae05111399 - Show all commits

View File

@ -58,7 +58,7 @@ func TestPull(t *testing.T) {
diff, _, err := c.GetPullRequestDiff(c.username, repoName, pullUpdateFile.Index)
assert.NoError(t, err)
assert.Len(t, diff, 1281)
assert.True(t, len(diff) > 1100 && len(diff) < 1300)
patch, _, err := c.GetPullRequestPatch(c.username, repoName, pullUpdateFile.Index)
assert.NoError(t, err)
assert.True(t, len(patch) > len(diff))