Skip to content

Commit

Permalink
Fix GitLab pull request state parameter (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulkane-gamesys committed Jun 21, 2023
1 parent 24b30dd commit 2b0ee0b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vcsclient/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (client *GitLabClient) CreatePullRequest(ctx context.Context, owner, reposi

// ListOpenPullRequests on GitLab
func (client *GitLabClient) ListOpenPullRequests(ctx context.Context, _, repository string) ([]PullRequestInfo, error) {
openState := "open"
openState := "opened"
allScope := "all"
options := &gitlab.ListMergeRequestsOptions{
State: &openState,
Expand Down
2 changes: 1 addition & 1 deletion vcsclient/gitlab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func TestGitLabClient_ListOpenPullRequests(t *testing.T) {
assert.NoError(t, err)

client, cleanUp := createServerAndClient(t, vcsutils.GitLab, false, response,
"/api/v4/merge_requests?scope=all&state=open", createGitLabHandler)
"/api/v4/merge_requests?scope=all&state=opened", createGitLabHandler)
defer cleanUp()

result, err := client.ListOpenPullRequests(ctx, owner, repo1)
Expand Down
2 changes: 1 addition & 1 deletion vcsclient/testdata/gitlab/pull_requests_list_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"project_id": 3,
"title": "test1",
"description": "fixed login page css paddings",
"state": "open",
"state": "opened",
"merge_user": {
"id": 87854,
"name": "Douwe Maan",
Expand Down

0 comments on commit 2b0ee0b

Please sign in to comment.