Commit f3bc634a authored by Antoine Baudrand's avatar Antoine Baudrand Committed by Sander van Harmelen

Fix ListProjectContributionEvents fails with 404 error (#449) (#450)

* Fix ListProjectContributionEvents fails with 404 error (#449)

* Rename EventsService.ListProjectContributionEvents to EventsService.ListProjectVisibleEvents to match with gitlab API changes
parent af28ecc5
...@@ -122,15 +122,15 @@ func (s *EventsService) ListCurrentUserContributionEvents(opt *ListContributionE ...@@ -122,15 +122,15 @@ func (s *EventsService) ListCurrentUserContributionEvents(opt *ListContributionE
return cs, resp, err return cs, resp, err
} }
// ListProjectContributionEvents gets a list currently authenticated user's events // ListProjectVisibleEvents gets a list of visible events for a particular project
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/events.html#list-a-project-39-s-visible-events // GitLab API docs: https://docs.gitlab.com/ee/api/events.html#list-a-project-s-visible-events
func (s *EventsService) ListProjectContributionEvents(pid interface{}, opt *ListContributionEventsOptions, options ...OptionFunc) ([]*ContributionEvent, *Response, error) { func (s *EventsService) ListProjectVisibleEvents(pid interface{}, opt *ListContributionEventsOptions, options ...OptionFunc) ([]*ContributionEvent, *Response, error) {
project, err := parseID(pid) project, err := parseID(pid)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("%s/events", url.QueryEscape(project)) u := fmt.Sprintf("projects/%s/events", url.QueryEscape(project))
req, err := s.client.NewRequest("GET", u, opt, options) req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment