-
Couldn't load subscription status.
- Fork 486
Support the "environment" field in the Pipeline and Job webhook events #1297
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
Support the "environment" field in the Pipeline and Job webhook events #1297
Conversation
551c1c3 to
306a159
Compare
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.
Looks good to me.
I am not sure why we have 2 packages:
org.gitlab4j.api.webhookorg.gitlab4j.api.models
But since we have them and Build is only used by PipelineEvent, I agree it should be in webhook and not models. I agree with your point of not changing it to not break anything.
The example json files that correspond to PipelineEvent and BuildEvent:
"pipeline-event.json""build-event.json"
--> They should be updated (they should contain the example values corresponding to the model extension made with this PR)
|
I looked at some real webhook event from our gitlab installation, and I can't parse {
"object_kind": "build",
...
"environment": {
"name": "docs-1504-guide-2-0",
"action": "start"
}
}You added those "auto_stop_at", "state", "tier", "external_url", "last_deployment", "id", "name", "slug", to but "action" seems to be missing in your list... |
gitlab4j-models/src/main/java/org/gitlab4j/api/webhook/BuildEvent.java
Outdated
Show resolved
Hide resolved
Hey @jmini, yes, this is related to this comment. I've fixed it |
|
Hey @jmini , I added
Please let me know if you have any further comments. |
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. Thank you!
The Pipeline and Job webhook events support the
environmentfor deployment jobs, but they are missing in the library.You can find more information at https://docs.gitlab.com/user/project/integrations/webhook_events/ (search for
"environment": {to see an example).I noticed the
Buildclass is not in themodelspackage, instead ofwebhook. I didn't change it since it'd break compatibility, but let me know if you think I should change something about it.