-
Notifications
You must be signed in to change notification settings - Fork 83
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
[MM-387]: Added support to subscribe to release and deployment #515
base: master
Are you sure you want to change the base?
Conversation
@@ -74,6 +74,8 @@ func (g *gitlab) NewGroupHook(ctx context.Context, user *UserInfo, token *oauth2 | |||
JobEvents: &webhookOptions.JobEvents, | |||
PipelineEvents: &webhookOptions.PipelineEvents, | |||
WikiPageEvents: &webhookOptions.WikiPageEvents, | |||
DeploymentEvents: &webhookOptions.DeploymentEvents, | |||
ReleasesEvents: &webhookOptions.ReleaseEvents, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is called ReleaseEvents
everywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wiggin77 the key ReleasesEvents
is used in AddGroupHookOptions
struct from the github.com/xanzy/go-gitlab
package. It is predefined as ReleasesEvents
there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not at least be consistent within our own code?
@@ -111,6 +113,8 @@ func (g *gitlab) NewProjectHook(ctx context.Context, user *UserInfo, token *oaut | |||
JobEvents: &webhookOptions.JobEvents, | |||
PipelineEvents: &webhookOptions.PipelineEvents, | |||
WikiPageEvents: &webhookOptions.WikiPageEvents, | |||
DeploymentEvents: &webhookOptions.DeploymentEvents, | |||
ReleasesEvents: &webhookOptions.ReleaseEvents, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "ReleaseEvents"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wiggin77, Similar to #515 (comment)
@@ -52,6 +52,14 @@ func (fakeWebhookHandler) HandleJobs(_ context.Context, _ *gitlabLib.JobEvent) ( | |||
return nil, nil | |||
} | |||
|
|||
func (fakeWebhookHandler) HandleDeployment(_ context.Context, _ *gitlabLib.DeploymentEvent) ([]*webhook.HandleWebhook, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there are any unit tests for these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wiggin77, Added them, Please have a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Description
Added support to subscribe to release and deployment.
Screenshots
Issue link
Fixes #387
What to Test