-
Notifications
You must be signed in to change notification settings - Fork 478
Update with pipeline schedule support #319
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
Conversation
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.
@lpiet
The PR looks great. Just 3 small change requests:
-
Move the new pipeline schedule methods from
ProjectApi
toPipelineApi
. -
Create a pipeline-schedule.json file in
src/test/resources/org/gitlab4j/api
and add a test for it tosrc/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
. You'll find the JSON at: https://docs.gitlab.com/ee/api/pipeline_schedules.html#get-all-pipeline-schedules -
Create
src/test/java/org/gitlab4j/api/TestPipelineApi.java
and move the pipeline schedule tests fromTestProjectApi.java
into it. I will add additional Pipeline API tests to this in the future.
@@ -2395,4 +2395,166 @@ public Project setProjectAvatar(Object projectIdOrPath, File avatarFile) throws | |||
Response response = putUpload(Response.Status.OK, "avatar", avatarFile, "projects", getProjectIdOrPath(projectIdOrPath)); | |||
return (response.readEntity(Project.class)); | |||
} |
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.
The pipeline schedule methods should be moved to the org.gitlab4j.api.PipelineApi
class
I believe this covers it. I did notice that if I copy the exact json from the site any timestamp with a millisecond field of 000 fails the test (if it has any millisecond value it works) . But this was also the case for the existing tests. The json converter strips the trailing 0's and then the generated and input json don't match. ex. "next_run_at": "2017-05-19T13:41:00.000Z". PS |
@lpiet |
@lpiet |
correct |
@lpiet Thanks again for your contribution. |
Hopefully doing this the right way, but I figured if I open the issue I might contribute to the solution.
Tested it against our on premise gitlab instance and it seems to work. Hopefully should help implement the support for the pipeline schedules.