Skip to content

Add API to get PR by base/head #29242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Feb 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test, take 2
  • Loading branch information
qwerty287 committed Feb 24, 2024
commit 5429ec06d485ea1f09112067f64b46ffa6256c7c
8 changes: 3 additions & 5 deletions tests/integration/api_pull_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,12 @@ func TestAPIViewPullsByBaseHead(t *testing.T) {

pull := &api.PullRequest{}
DecodeJSON(t, resp, pull)
assert.Equal(t, 3, pull.Index)
assert.Equal(t, 2, pull.ID)
assert.EqualValues(t, 3, pull.Index)
assert.EqualValues(t, 2, pull.ID)

req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls/master/branch-not-exist", owner.Name, repo.Name).
AddTokenAuth(ctx.Token)
resp = ctx.Session.MakeRequest(t, req, http.StatusOK)

assert.Equal(t, http.NotFound, resp.Code)
ctx.Session.MakeRequest(t, req, http.StatusNotFound)
}

// TestAPIMergePullWIP ensures that we can't merge a WIP pull request
Expand Down