This repository was archived by the owner on Jan 5, 2019. It is now read-only.
Merged
Conversation
…d by hooks - main motiviation is to improve generated code in taskcluster-client-go
Member
Author
|
Please note this does not clash with PR #8. If we land both changes we'll have
I think these are both good names, and since |
djmitche
added a commit
to djmitche/taskcluster-hooks
that referenced
this pull request
Nov 11, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes are to improve the generated hooks library code in taskcluster-client-go.
At the moment we have two schemas with the title
Hook Schedulewhich results in generated go typesHookScheduleand embedded inside it,HookSchedule1. I've renamedHookSchedule1toScheduleand updated description for it to be an abstract schedule (not hook-specific), and thatHookSchedulenow contains the hook-relevant context in its description.If you take a close look at the godocs, you'll see
HookSchedule.Scheduledoesn't have a description (unlikeHookSchedule.NextScheduledDate) which is also a reason for moving the description up a level toHookSchedule, so that both of its members now have a description, and then inside the newScheduletype (that used to be calledHookSchedule1) the description is now about how it represents a generic (non-hook-specific) schedule.I wasn't sure how to test my changes, i.e. how to convert the
.ymlfiles to.jsonand then view the updated docs in a web browser. Maybe we should set up a staging env using heroku pipelines and then it would be possible to validate these changes before pushing to production. What do you think? So - to be clear - I haven't worked out how to test that these yml changes result in valid json.