Skip to content

Conversation

@CodeDrivenMitch
Copy link
Contributor

@CodeDrivenMitch CodeDrivenMitch commented May 17, 2021

I noticed the following webhooks were missing for projects:

  • Deployments
  • Releases

I need both for my project, so decided to add them here. I have tested them with my own GitLab instance, it works great so far.
There are no integration tests for webhooks currently, so I have not added tests for them.

@CodeDrivenMitch CodeDrivenMitch marked this pull request as ready for review May 20, 2021 17:52
Copy link
Collaborator

@jabby jabby left a comment

Choose a reason for hiding this comment

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

Hello,

Thanks for your contribution. Can you add some tests in TestGitLabApiEvents? And take care of the following comments.

By the way I fixed #606 so you may have to rebase your work. Sorry for the inconvenience.

.withParam("pipeline_events", hook.getPipelineEvents(), false)
.withParam("wiki_events", hook.getWikiPageEvents(), false)
.withParam("enable_ssl_verification", hook.getEnableSslVerification(), false)
.withParam("url", hook.getUrl(), true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove the formatting change here?

public static final String OBJECT_KIND = "deployment";

private String status;
private String statusChanged_at;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure the name is correct. Should be statusChangedAt

Comment on lines +40 to +46
public String getStatusChanged_at() {
return statusChanged_at;
}

public void setStatusChanged_at(String statusChanged_at) {
this.statusChanged_at = statusChanged_at;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't forget to update getter and setter here.

String message = "Unsupported X-Gitlab-Event, event Name=" + eventName;
LOGGER.warning(message);
throw new GitLabApiException(message);
case IssueEvent.X_GITLAB_EVENT:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove the formatting change here?

String message = "Unsupported event object_kind, object_kind=" + event.getObjectKind();
LOGGER.warning(message);
throw new GitLabApiException(message);
case BuildEvent.OBJECT_KIND:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove the formatting change here?

String message = "Unsupported event object_kind, object_kind=" + event.getObjectKind();
LOGGER.warning(message);
throw new GitLabApiException(message);
case BuildEvent.OBJECT_KIND:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove the formatting change here?

@tubbynl
Copy link
Contributor

tubbynl commented Sep 18, 2021

fixes #758

@tubbynl
Copy link
Contributor

tubbynl commented Sep 18, 2021

hi @jabby i handled your requests on my fork

  • cleanup formatting changes
  • merged / synced / rebased master
  • renamed statusChanged_at to statusChangedAt

not sure on how to merged this, i can't supplement this pull-request; do i create a new one?

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.

3 participants