-
Notifications
You must be signed in to change notification settings - Fork 467
Added missing attributes for webhook events #1240
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
Added missing attributes for webhook events #1240
Conversation
/** | ||
* Enum for the various Build status values. | ||
*/ | ||
public enum BuildStatus { |
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.
I am wondering if this is not a duplication of the enum Constants.JobScope
that we already have.
But BuildStatus
seems a better name and feels more natural.
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.
I actually copied JobStatus
into BuildStatus
, they're the same except for the name. But I figured it's more clear to distinguish between jobs and builds
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 looks a very good addition to the project. 👍
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.
Just there are build failure after your change.
I think this is due to the fact that there was already a BuildEvent
with OBJECT_KIND build
gitlab4j-api/gitlab4j-api/src/main/java/org/gitlab4j/api/WebHookManager.java
Lines 179 to 190 in 7e8795e
case BuildEvent.OBJECT_KIND: | |
case IssueEvent.OBJECT_KIND: | |
case JobEvent.OBJECT_KIND: | |
case MergeRequestEvent.OBJECT_KIND: | |
case NoteEvent.OBJECT_KIND: | |
case PipelineEvent.OBJECT_KIND: | |
case PushEvent.OBJECT_KIND: | |
case TagPushEvent.OBJECT_KIND: | |
case WikiPageEvent.OBJECT_KIND: | |
case ReleaseEvent.OBJECT_KIND: | |
case DeploymentEvent.OBJECT_KIND: | |
case WorkItemEvent.OBJECT_KIND: |
I didn't look into all the details, but different/more cleanup might be necessary.
You're right, there already is a |
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.
No problem.
Thank you very much for the update and the 🧹 .
Updated the following events with missing properties
AbstractPushEvent
BuildCommit
EventCommit
EventIssue
JobEvent
PipelineEvent
WikiPageEvent
Especially,
PipelineEvent
andJobEvent
have changed.PipelineEvent
no longer uses ajobs
array (Job
), but abuilds
array (Build
). I have not removed thejobs
array for backwards compatibility.JobEvent
no longer usesjob
prefixed properties, butbuild
prefixed properties. I have not removed thejob
prefixed properties for backwards compatibility. I did change the object_kind tobuild
as it should be according to the docs (used to bejob
in version 12.x, but changed tobuild
in version 13.x). This might break backwards compatibility.