From e457926afd7503ea57af7c94c904eff95cf3ce03 Mon Sep 17 00:00:00 2001 From: zubeen Date: Wed, 29 Oct 2025 00:55:06 +0530 Subject: [PATCH 1/3] refactor: moved comments to interface 2 --- error_tracking.go | 46 +++++++------ events.go | 22 +++---- external_status_checks.go | 135 ++++++++++++++++++++------------------ 3 files changed, 105 insertions(+), 98 deletions(-) diff --git a/error_tracking.go b/error_tracking.go index 14de8ea8..a53adc37 100644 --- a/error_tracking.go +++ b/error_tracking.go @@ -24,10 +24,35 @@ import ( type ( // ErrorTrackingServiceInterface defines all the API methods for the ErrorTrackingService ErrorTrackingServiceInterface interface { + // GetErrorTrackingSettings gets error tracking settings. + // + // GitLab API docs: + // https://docs.gitlab.com/api/error_tracking/#get-error-tracking-settings GetErrorTrackingSettings(pid any, options ...RequestOptionFunc) (*ErrorTrackingSettings, *Response, error) + + // EnableDisableErrorTracking allows you to enable or disable the error tracking + // settings for a project. + // + // GitLab API docs: + // https://docs.gitlab.com/api/error_tracking/#enable-or-disable-the-error-tracking-project-settings EnableDisableErrorTracking(pid any, opt *EnableDisableErrorTrackingOptions, options ...RequestOptionFunc) (*ErrorTrackingSettings, *Response, error) + + // ListClientKeys lists error tracking project client keys. + // + // GitLab API docs: + // https://docs.gitlab.com/api/error_tracking/#list-project-client-keys ListClientKeys(pid any, opt *ListClientKeysOptions, options ...RequestOptionFunc) ([]*ErrorTrackingClientKey, *Response, error) + + // CreateClientKey creates a new client key for a project. + // + // GitLab API docs: + // https://docs.gitlab.com/api/error_tracking/#create-a-client-key CreateClientKey(pid any, options ...RequestOptionFunc) (*ErrorTrackingClientKey, *Response, error) + + // DeleteClientKey removes a client key from the project. + // + // GitLab API docs: + // https://docs.gitlab.com/api/error_tracking/#delete-a-client-key DeleteClientKey(pid any, keyID int, options ...RequestOptionFunc) (*Response, error) } @@ -72,10 +97,6 @@ func (p ErrorTrackingSettings) String() string { return Stringify(p) } -// GetErrorTrackingSettings gets error tracking settings. -// -// GitLab API docs: -// https://docs.gitlab.com/api/error_tracking/#get-error-tracking-settings func (s *ErrorTrackingService) GetErrorTrackingSettings(pid any, options ...RequestOptionFunc) (*ErrorTrackingSettings, *Response, error) { project, err := parseID(pid) if err != nil { @@ -107,11 +128,6 @@ type EnableDisableErrorTrackingOptions struct { Integrated *bool `url:"integrated,omitempty" json:"integrated,omitempty"` } -// EnableDisableErrorTracking allows you to enable or disable the error tracking -// settings for a project. -// -// GitLab API docs: -// https://docs.gitlab.com/api/error_tracking/#enable-or-disable-the-error-tracking-project-settings func (s *ErrorTrackingService) EnableDisableErrorTracking(pid any, opt *EnableDisableErrorTrackingOptions, options ...RequestOptionFunc) (*ErrorTrackingSettings, *Response, error) { project, err := parseID(pid) if err != nil { @@ -139,10 +155,6 @@ func (s *ErrorTrackingService) EnableDisableErrorTracking(pid any, opt *EnableDi // https://docs.gitlab.com/api/error_tracking/#list-project-client-keys type ListClientKeysOptions ListOptions -// ListClientKeys lists error tracking project client keys. -// -// GitLab API docs: -// https://docs.gitlab.com/api/error_tracking/#list-project-client-keys func (s *ErrorTrackingService) ListClientKeys(pid any, opt *ListClientKeysOptions, options ...RequestOptionFunc) ([]*ErrorTrackingClientKey, *Response, error) { project, err := parseID(pid) if err != nil { @@ -164,10 +176,6 @@ func (s *ErrorTrackingService) ListClientKeys(pid any, opt *ListClientKeysOption return cks, resp, nil } -// CreateClientKey creates a new client key for a project. -// -// GitLab API docs: -// https://docs.gitlab.com/api/error_tracking/#create-a-client-key func (s *ErrorTrackingService) CreateClientKey(pid any, options ...RequestOptionFunc) (*ErrorTrackingClientKey, *Response, error) { project, err := parseID(pid) if err != nil { @@ -189,10 +197,6 @@ func (s *ErrorTrackingService) CreateClientKey(pid any, options ...RequestOption return ck, resp, nil } -// DeleteClientKey removes a client key from the project. -// -// GitLab API docs: -// https://docs.gitlab.com/api/error_tracking/#delete-a-client-key func (s *ErrorTrackingService) DeleteClientKey(pid any, keyID int, options ...RequestOptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { diff --git a/events.go b/events.go index 5107a5aa..d122dc73 100644 --- a/events.go +++ b/events.go @@ -25,7 +25,17 @@ import ( type ( // EventsServiceInterface defines all the API methods for the EventsService EventsServiceInterface interface { + // ListUserContributionEvents retrieves user contribution events + // for the specified user, sorted from newest to oldest. + // + // GitLab API docs: + // https://docs.gitlab.com/api/events/#get-user-contribution-events ListCurrentUserContributionEvents(opt *ListContributionEventsOptions, options ...RequestOptionFunc) ([]*ContributionEvent, *Response, error) + + // ListProjectVisibleEvents gets the events for the specified project. + // + // GitLab API docs: + // https://docs.gitlab.com/api/events/#list-a-projects-visible-events ListProjectVisibleEvents(pid any, opt *ListProjectVisibleEventsOptions, options ...RequestOptionFunc) ([]*ProjectEvent, *Response, error) } @@ -89,11 +99,6 @@ type ListContributionEventsOptions struct { Sort *string `url:"sort,omitempty" json:"sort,omitempty"` } -// ListUserContributionEvents retrieves user contribution events -// for the specified user, sorted from newest to oldest. -// -// GitLab API docs: -// https://docs.gitlab.com/api/events/#get-user-contribution-events func (s *UsersService) ListUserContributionEvents(uid any, opt *ListContributionEventsOptions, options ...RequestOptionFunc) ([]*ContributionEvent, *Response, error) { user, err := parseID(uid) if err != nil { @@ -115,9 +120,6 @@ func (s *UsersService) ListUserContributionEvents(uid any, opt *ListContribution return cs, resp, nil } -// ListCurrentUserContributionEvents gets a list currently authenticated user's events -// -// GitLab API docs: https://docs.gitlab.com/api/events/#list-currently-authenticated-users-events func (s *EventsService) ListCurrentUserContributionEvents(opt *ListContributionEventsOptions, options ...RequestOptionFunc) ([]*ContributionEvent, *Response, error) { req, err := s.client.NewRequest(http.MethodGet, "events", opt, options) if err != nil { @@ -215,10 +217,6 @@ type ListProjectVisibleEventsOptions struct { Sort *string `url:"sort,omitempty" json:"sort,omitempty"` } -// ListProjectVisibleEvents gets the events for the specified project. -// -// GitLab API docs: -// https://docs.gitlab.com/api/events/#list-a-projects-visible-events func (s *EventsService) ListProjectVisibleEvents(pid any, opt *ListProjectVisibleEventsOptions, options ...RequestOptionFunc) ([]*ProjectEvent, *Response, error) { project, err := parseID(pid) if err != nil { diff --git a/external_status_checks.go b/external_status_checks.go index aff042ad..6788239b 100644 --- a/external_status_checks.go +++ b/external_status_checks.go @@ -9,27 +9,97 @@ import ( type ( // ExternalStatusChecksServiceInterface defines all the API methods for the ExternalStatusChecksService ExternalStatusChecksServiceInterface interface { + // CreateExternalStatusCheck creates an external status check. // Deprecated: to be removed in 1.0; use CreateProjectExternalStatusCheck instead + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#create-external-status-check-service CreateExternalStatusCheck(pid any, opt *CreateExternalStatusCheckOptions, options ...RequestOptionFunc) (*Response, error) + + // DeleteExternalStatusCheck deletes an external status check. // Deprecated: to be removed in 1.0; use DeleteProjectExternalStatusCheck instead + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#delete-external-status-check-service DeleteExternalStatusCheck(pid any, check int, options ...RequestOptionFunc) (*Response, error) + + // UpdateExternalStatusCheck updates an external status check. // Deprecated: to be removed in 1.0; use UpdateProjectExternalStatusCheck instead + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#update-external-status-check-service UpdateExternalStatusCheck(pid any, check int, opt *UpdateExternalStatusCheckOptions, options ...RequestOptionFunc) (*Response, error) + + // ListMergeStatusChecks lists the external status checks that apply to it + // and their status for a single merge request. // Deprecated: to be removed in 1.0; use ListProjectMergeRequestExternalStatusChecks instead + // + // GitLab API docs: + // https://docs.gitlab.com/api/status_checks/#list-status-checks-for-a-merge-request ListMergeStatusChecks(pid any, mr int, opt *ListOptions, options ...RequestOptionFunc) ([]*MergeStatusCheck, *Response, error) + + // ListProjectStatusChecks lists the project external status checks. // Deprecated: to be removed in 1.0; use ListProjectExternalStatusChecks instead + // + // GitLab API docs: + // https://docs.gitlab.com/api/status_checks/#get-project-external-status-check-services ListProjectStatusChecks(pid any, opt *ListOptions, options ...RequestOptionFunc) ([]*ProjectStatusCheck, *Response, error) + + // RetryFailedStatusCheckForAMergeRequest retries the specified failed external status check. // Deprecated: to be removed in 1.0; use RetryFailedExternalStatusCheckForProjectMergeRequest instead + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#retry-failed-status-check-for-a-merge-request RetryFailedStatusCheckForAMergeRequest(pid any, mergeRequest int, externalStatusCheck int, options ...RequestOptionFunc) (*Response, error) + + // SetExternalStatusCheckStatus sets the status of an external status check. // Deprecated: to be removed in 1.0; use SetProjectMergeRequestExternalStatusCheckStatus instead + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#set-status-of-an-external-status-check SetExternalStatusCheckStatus(pid any, mergeRequest int, opt *SetExternalStatusCheckStatusOptions, options ...RequestOptionFunc) (*Response, error) + // ListProjectMergeRequestExternalStatusChecks lists the external status checks that apply to it + // and their status for a single merge request. + // + // GitLab API docs: + // https://docs.gitlab.com/api/status_checks/#list-status-checks-for-a-merge-request ListProjectMergeRequestExternalStatusChecks(pid any, mr int, opt *ListProjectMergeRequestExternalStatusChecksOptions, options ...RequestOptionFunc) ([]*MergeStatusCheck, *Response, error) + + // ListProjectExternalStatusChecks lists the project external status checks. + // + // GitLab API docs: + // https://docs.gitlab.com/api/status_checks/#get-project-external-status-check-services ListProjectExternalStatusChecks(pid any, opt *ListProjectExternalStatusChecksOptions, options ...RequestOptionFunc) ([]*ProjectStatusCheck, *Response, error) + + // RetryFailedExternalStatusCheckForProjectMergeRequest retries the specified failed external status check. + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#retry-failed-status-check-for-a-merge-request RetryFailedExternalStatusCheckForProjectMergeRequest(pid any, mergeRequest int, externalStatusCheck int, opt *RetryFailedExternalStatusCheckForProjectMergeRequestOptions, options ...RequestOptionFunc) (*Response, error) + + // CreateProjectExternalStatusCheck creates an external status check. + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#create-external-status-check-service CreateProjectExternalStatusCheck(pid any, opt *CreateProjectExternalStatusCheckOptions, options ...RequestOptionFunc) (*ProjectStatusCheck, *Response, error) + + // UpdateProjectExternalStatusCheck updates an external status check. + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#update-external-status-check-service UpdateProjectExternalStatusCheck(pid any, check int, opt *UpdateProjectExternalStatusCheckOptions, options ...RequestOptionFunc) (*ProjectStatusCheck, *Response, error) + + // DeleteProjectExternalStatusCheck deletes an external status check. + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#delete-external-status-check-service DeleteProjectExternalStatusCheck(pid any, check int, opt *DeleteProjectExternalStatusCheckOptions, options ...RequestOptionFunc) (*Response, error) + + // SetProjectMergeRequestExternalStatusCheckStatus sets the status of an external status check. + // + // Gitlab API docs: + // https://docs.gitlab.com/api/status_checks/#set-status-of-an-external-status-check SetProjectMergeRequestExternalStatusCheckStatus(pid any, mergeRequest int, opt *SetProjectMergeRequestExternalStatusCheckStatusOptions, options ...RequestOptionFunc) (*Response, error) } @@ -69,12 +139,6 @@ type StatusCheckProtectedBranch struct { CodeOwnerApprovalRequired bool `json:"code_owner_approval_required"` } -// ListMergeStatusChecks lists the external status checks that apply to it -// and their status for a single merge request. -// Deprecated: to be removed in 1.0; use ListProjectMergeRequestExternalStatusChecks instead -// -// GitLab API docs: -// https://docs.gitlab.com/api/status_checks/#list-status-checks-for-a-merge-request func (s *ExternalStatusChecksService) ListMergeStatusChecks(pid any, mr int, opt *ListOptions, options ...RequestOptionFunc) ([]*MergeStatusCheck, *Response, error) { project, err := parseID(pid) if err != nil { @@ -108,11 +172,6 @@ type SetExternalStatusCheckStatusOptions struct { Status *string `url:"status,omitempty" json:"status,omitempty"` } -// SetExternalStatusCheckStatus sets the status of an external status check. -// Deprecated: to be removed in 1.0; use SetProjectMergeRequestExternalStatusCheckStatus instead -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#set-status-of-an-external-status-check func (s *ExternalStatusChecksService) SetExternalStatusCheckStatus(pid any, mergeRequest int, opt *SetExternalStatusCheckStatusOptions, options ...RequestOptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { @@ -128,11 +187,6 @@ func (s *ExternalStatusChecksService) SetExternalStatusCheckStatus(pid any, merg return s.client.Do(req, nil) } -// ListProjectStatusChecks lists the project external status checks. -// Deprecated: to be removed in 1.0; use ListProjectExternalStatusChecks instead -// -// GitLab API docs: -// https://docs.gitlab.com/api/status_checks/#get-project-external-status-check-services func (s *ExternalStatusChecksService) ListProjectStatusChecks(pid any, opt *ListOptions, options ...RequestOptionFunc) ([]*ProjectStatusCheck, *Response, error) { project, err := parseID(pid) if err != nil { @@ -166,11 +220,6 @@ type CreateExternalStatusCheckOptions struct { ProtectedBranchIDs *[]int `url:"protected_branch_ids,omitempty" json:"protected_branch_ids,omitempty"` } -// CreateExternalStatusCheck creates an external status check. -// Deprecated: to be removed in 1.0; use CreateProjectExternalStatusCheck instead -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#create-external-status-check-service func (s *ExternalStatusChecksService) CreateExternalStatusCheck(pid any, opt *CreateExternalStatusCheckOptions, options ...RequestOptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { @@ -186,11 +235,6 @@ func (s *ExternalStatusChecksService) CreateExternalStatusCheck(pid any, opt *Cr return s.client.Do(req, nil) } -// DeleteExternalStatusCheck deletes an external status check. -// Deprecated: to be removed in 1.0; use DeleteProjectExternalStatusCheck instead -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#delete-external-status-check-service func (s *ExternalStatusChecksService) DeleteExternalStatusCheck(pid any, check int, options ...RequestOptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { @@ -218,11 +262,6 @@ type UpdateExternalStatusCheckOptions struct { ProtectedBranchIDs *[]int `url:"protected_branch_ids,omitempty" json:"protected_branch_ids,omitempty"` } -// UpdateExternalStatusCheck updates an external status check. -// Deprecated: to be removed in 1.0; use UpdateProjectExternalStatusCheck instead -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#update-external-status-check-service func (s *ExternalStatusChecksService) UpdateExternalStatusCheck(pid any, check int, opt *UpdateExternalStatusCheckOptions, options ...RequestOptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { @@ -238,11 +277,6 @@ func (s *ExternalStatusChecksService) UpdateExternalStatusCheck(pid any, check i return s.client.Do(req, nil) } -// RetryFailedStatusCheckForAMergeRequest retries the specified failed external status check. -// Deprecated: to be removed in 1.0; use RetryFailedExternalStatusCheckForProjectMergeRequest instead -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#retry-failed-status-check-for-a-merge-request func (s *ExternalStatusChecksService) RetryFailedStatusCheckForAMergeRequest(pid any, mergeRequest int, externalStatusCheck int, options ...RequestOptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { @@ -267,11 +301,6 @@ type ListProjectMergeRequestExternalStatusChecksOptions struct { ListOptions } -// ListProjectMergeRequestExternalStatusChecks lists the external status checks that apply to it -// and their status for a single merge request. -// -// GitLab API docs: -// https://docs.gitlab.com/api/status_checks/#list-status-checks-for-a-merge-request func (s *ExternalStatusChecksService) ListProjectMergeRequestExternalStatusChecks(pid any, mr int, opt *ListProjectMergeRequestExternalStatusChecksOptions, options ...RequestOptionFunc) ([]*MergeStatusCheck, *Response, error) { project, err := parseID(pid) if err != nil { @@ -302,10 +331,6 @@ type ListProjectExternalStatusChecksOptions struct { ListOptions } -// ListProjectExternalStatusChecks lists the project external status checks. -// -// GitLab API docs: -// https://docs.gitlab.com/api/status_checks/#get-project-external-status-check-services func (s *ExternalStatusChecksService) ListProjectExternalStatusChecks(pid any, opt *ListProjectExternalStatusChecksOptions, options ...RequestOptionFunc) ([]*ProjectStatusCheck, *Response, error) { project, err := parseID(pid) if err != nil { @@ -339,10 +364,6 @@ type CreateProjectExternalStatusCheckOptions struct { ProtectedBranchIDs *[]int `url:"protected_branch_ids,omitempty" json:"protected_branch_ids,omitempty"` } -// CreateProjectExternalStatusCheck creates an external status check. -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#create-external-status-check-service func (s *ExternalStatusChecksService) CreateProjectExternalStatusCheck(pid any, opt *CreateProjectExternalStatusCheckOptions, options ...RequestOptionFunc) (*ProjectStatusCheck, *Response, error) { project, err := parseID(pid) if err != nil { @@ -371,10 +392,6 @@ func (s *ExternalStatusChecksService) CreateProjectExternalStatusCheck(pid any, // https://docs.gitlab.com/api/status_checks/#delete-external-status-check-service type DeleteProjectExternalStatusCheckOptions struct{} -// DeleteProjectExternalStatusCheck deletes an external status check. -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#delete-external-status-check-service func (s *ExternalStatusChecksService) DeleteProjectExternalStatusCheck(pid any, check int, opt *DeleteProjectExternalStatusCheckOptions, options ...RequestOptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { @@ -402,10 +419,6 @@ type UpdateProjectExternalStatusCheckOptions struct { ProtectedBranchIDs *[]int `url:"protected_branch_ids,omitempty" json:"protected_branch_ids,omitempty"` } -// UpdateProjectExternalStatusCheck updates an external status check. -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#update-external-status-check-service func (s *ExternalStatusChecksService) UpdateProjectExternalStatusCheck(pid any, check int, opt *UpdateProjectExternalStatusCheckOptions, options ...RequestOptionFunc) (*ProjectStatusCheck, *Response, error) { project, err := parseID(pid) if err != nil { @@ -434,10 +447,6 @@ func (s *ExternalStatusChecksService) UpdateProjectExternalStatusCheck(pid any, // https://docs.gitlab.com/api/status_checks/#retry-failed-status-check-for-a-merge-request type RetryFailedExternalStatusCheckForProjectMergeRequestOptions struct{} -// RetryFailedExternalStatusCheckForProjectMergeRequest retries the specified failed external status check. -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#retry-failed-status-check-for-a-merge-request func (s *ExternalStatusChecksService) RetryFailedExternalStatusCheckForProjectMergeRequest(pid any, mergeRequest int, externalStatusCheck int, opt *RetryFailedExternalStatusCheckForProjectMergeRequestOptions, options ...RequestOptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { @@ -464,10 +473,6 @@ type SetProjectMergeRequestExternalStatusCheckStatusOptions struct { Status *string `url:"status,omitempty" json:"status,omitempty"` } -// SetProjectMergeRequestExternalStatusCheckStatus sets the status of an external status check. -// -// Gitlab API docs: -// https://docs.gitlab.com/api/status_checks/#set-status-of-an-external-status-check func (s *ExternalStatusChecksService) SetProjectMergeRequestExternalStatusCheckStatus(pid any, mergeRequest int, opt *SetProjectMergeRequestExternalStatusCheckStatusOptions, options ...RequestOptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { -- GitLab From 5a31af34f78796f63bc04774d72fb8d10b83f25d Mon Sep 17 00:00:00 2001 From: Zubeen Date: Wed, 29 Oct 2025 01:05:26 +0530 Subject: [PATCH 2/3] resolve duo's review comments --- external_status_checks.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/external_status_checks.go b/external_status_checks.go index 6788239b..0678a487 100644 --- a/external_status_checks.go +++ b/external_status_checks.go @@ -12,21 +12,21 @@ type ( // CreateExternalStatusCheck creates an external status check. // Deprecated: to be removed in 1.0; use CreateProjectExternalStatusCheck instead // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#create-external-status-check-service CreateExternalStatusCheck(pid any, opt *CreateExternalStatusCheckOptions, options ...RequestOptionFunc) (*Response, error) // DeleteExternalStatusCheck deletes an external status check. // Deprecated: to be removed in 1.0; use DeleteProjectExternalStatusCheck instead // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#delete-external-status-check-service DeleteExternalStatusCheck(pid any, check int, options ...RequestOptionFunc) (*Response, error) // UpdateExternalStatusCheck updates an external status check. // Deprecated: to be removed in 1.0; use UpdateProjectExternalStatusCheck instead // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#update-external-status-check-service UpdateExternalStatusCheck(pid any, check int, opt *UpdateExternalStatusCheckOptions, options ...RequestOptionFunc) (*Response, error) @@ -48,14 +48,14 @@ type ( // RetryFailedStatusCheckForAMergeRequest retries the specified failed external status check. // Deprecated: to be removed in 1.0; use RetryFailedExternalStatusCheckForProjectMergeRequest instead // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#retry-failed-status-check-for-a-merge-request RetryFailedStatusCheckForAMergeRequest(pid any, mergeRequest int, externalStatusCheck int, options ...RequestOptionFunc) (*Response, error) // SetExternalStatusCheckStatus sets the status of an external status check. // Deprecated: to be removed in 1.0; use SetProjectMergeRequestExternalStatusCheckStatus instead // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#set-status-of-an-external-status-check SetExternalStatusCheckStatus(pid any, mergeRequest int, opt *SetExternalStatusCheckStatusOptions, options ...RequestOptionFunc) (*Response, error) @@ -74,31 +74,31 @@ type ( // RetryFailedExternalStatusCheckForProjectMergeRequest retries the specified failed external status check. // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#retry-failed-status-check-for-a-merge-request RetryFailedExternalStatusCheckForProjectMergeRequest(pid any, mergeRequest int, externalStatusCheck int, opt *RetryFailedExternalStatusCheckForProjectMergeRequestOptions, options ...RequestOptionFunc) (*Response, error) // CreateProjectExternalStatusCheck creates an external status check. // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#create-external-status-check-service CreateProjectExternalStatusCheck(pid any, opt *CreateProjectExternalStatusCheckOptions, options ...RequestOptionFunc) (*ProjectStatusCheck, *Response, error) // UpdateProjectExternalStatusCheck updates an external status check. // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#update-external-status-check-service UpdateProjectExternalStatusCheck(pid any, check int, opt *UpdateProjectExternalStatusCheckOptions, options ...RequestOptionFunc) (*ProjectStatusCheck, *Response, error) // DeleteProjectExternalStatusCheck deletes an external status check. // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#delete-external-status-check-service DeleteProjectExternalStatusCheck(pid any, check int, opt *DeleteProjectExternalStatusCheckOptions, options ...RequestOptionFunc) (*Response, error) // SetProjectMergeRequestExternalStatusCheckStatus sets the status of an external status check. // - // Gitlab API docs: + // GitLab API docs: // https://docs.gitlab.com/api/status_checks/#set-status-of-an-external-status-check SetProjectMergeRequestExternalStatusCheckStatus(pid any, mergeRequest int, opt *SetProjectMergeRequestExternalStatusCheckStatusOptions, options ...RequestOptionFunc) (*Response, error) } -- GitLab From aecbd0f1d2cd7378e0a8de77eed5f733487141f5 Mon Sep 17 00:00:00 2001 From: zubeen Date: Wed, 29 Oct 2025 01:25:11 +0530 Subject: [PATCH 3/3] fix duo's review comments --- events.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/events.go b/events.go index d122dc73..2e8f130d 100644 --- a/events.go +++ b/events.go @@ -25,11 +25,11 @@ import ( type ( // EventsServiceInterface defines all the API methods for the EventsService EventsServiceInterface interface { - // ListUserContributionEvents retrieves user contribution events - // for the specified user, sorted from newest to oldest. + // ListCurrentUserContributionEvents retrieves all events + // for the currently authenticated user. // // GitLab API docs: - // https://docs.gitlab.com/api/events/#get-user-contribution-events + // https://docs.gitlab.com/api/events/#list-all-events ListCurrentUserContributionEvents(opt *ListContributionEventsOptions, options ...RequestOptionFunc) ([]*ContributionEvent, *Response, error) // ListProjectVisibleEvents gets the events for the specified project. -- GitLab