Skip to content
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

Switch to "ListProjectMergeRequests" for GitLab #113

Conversation

jrryjcksn
Copy link
Contributor

Description

The support for listing GitLab pull requests (merge requests) is currently using ListMergeRequests. This returns all merge requests accessible by the authenticated user. We should instead be using ListProjectMergeRequests which scopes the query to a particular project (repository).

Test results

arete: ~jj/go-git-providers> CGO_ENABLED=1 make test
go mod tidy
go fmt ./...
go vet ./...
go test  -race -coverprofile=coverage.txt -covermode=atomic ./...
?   	github.com/fluxcd/go-git-providers/bitbucket	[no test files]
ok  	github.com/fluxcd/go-git-providers/github	18.484s	coverage: 49.1% of statements
ok  	github.com/fluxcd/go-git-providers/gitlab	53.498s	coverage: 73.1% of statements
ok  	github.com/fluxcd/go-git-providers/gitprovider	0.038s	coverage: 92.2% of statements
?   	github.com/fluxcd/go-git-providers/gitprovider/cache	[no test files]
?   	github.com/fluxcd/go-git-providers/gitprovider/testutils	[no test files]
ok  	github.com/fluxcd/go-git-providers/stash	7.006s	coverage: 70.0% of statements
ok  	github.com/fluxcd/go-git-providers/validation	0.033s	coverage: 100.0% of statements
arete: ~jj/go-git-providers> 

@jrryjcksn jrryjcksn force-pushed the switch-to-list-project-merge-requests-for-gitlab branch from 35f267b to 6615739 Compare October 6, 2021 16:59
Copy link
Collaborator

@yiannistri yiannistri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@yiannistri yiannistri merged commit 8334445 into fluxcd:main Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants