{"action":"created","comment":{"url":"https://api.github.com/repos/docker/libcompose/pulls/comments/63736528","id":63736528,"diff_hunk":"@@ -54,6 +62,14 @@ func Merge(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup\n \n \tadjustValues(serviceConfigs)\n \n+\tif options.Postprocess != nil {\n+\t\tvar err error\n+\t\tserviceConfigs, err = options.Postprocess(serviceConfigs)","path":"config/merge.go","position":51,"original_position":51,"commit_id":"586ac5ff1b114a9a32ef7429a9a524d99cc5ed78","original_commit_id":"586ac5ff1b114a9a32ef7429a9a524d99cc5ed78","user":{"login":"joshwget","id":6208550,"avatar_url":"https://avatars.githubusercontent.com/u/6208550?v=3","gravatar_id":"","url":"https://api.github.com/users/joshwget","html_url":"https://github.com/joshwget","followers_url":"https://api.github.com/users/joshwget/followers","following_url":"https://api.github.com/users/joshwget/following{/other_user}","gists_url":"https://api.github.com/users/joshwget/gists{/gist_id}","starred_url":"https://api.github.com/users/joshwget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshwget/subscriptions","organizations_url":"https://api.github.com/users/joshwget/orgs","repos_url":"https://api.github.com/users/joshwget/repos","events_url":"https://api.github.com/users/joshwget/events{/privacy}","received_events_url":"https://api.github.com/users/joshwget/received_events","type":"User","site_admin":false},"body":"Our use case for preprocess is to convert booleans to strings in `environment` and `labels` to maintain backwards compatibility with Compose files that haven't been updated. No immediate use case for postprocess, but it seemed like something that may be handy in the near future. Adding those fields may also be helpful in the future, so I'm definitely open to it!","created_at":"2016-05-18T16:28:01Z","updated_at":"2016-05-18T16:28:01Z","html_url":"https://github.com/docker/libcompose/pull/259#discussion_r63736528","pull_request_url":"https://api.github.com/repos/docker/libcompose/pulls/259","_links":{"self":{"href":"https://api.github.com/repos/docker/libcompose/pulls/comments/63736528"},"html":{"href":"https://github.com/docker/libcompose/pull/259#discussion_r63736528"},"pull_request":{"href":"https://api.github.com/repos/docker/libcompose/pulls/259"}}},"pull_request":{"url":"https://api.github.com/repos/docker/libcompose/pulls/259","id":69866881,"html_url":"https://github.com/docker/libcompose/pull/259","diff_url":"https://github.com/docker/libcompose/pull/259.diff","patch_url":"https://github.com/docker/libcompose/pull/259.patch","issue_url":"https://api.github.com/repos/docker/libcompose/issues/259","number":259,"state":"open","locked":false,"title":"Add options to make parsing more customizable","user":{"login":"joshwget","id":6208550,"avatar_url":"https://avatars.githubusercontent.com/u/6208550?v=3","gravatar_id":"","url":"https://api.github.com/users/joshwget","html_url":"https://github.com/joshwget","followers_url":"https://api.github.com/users/joshwget/followers","following_url":"https://api.github.com/users/joshwget/following{/other_user}","gists_url":"https://api.github.com/users/joshwget/gists{/gist_id}","starred_url":"https://api.github.com/users/joshwget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshwget/subscriptions","organizations_url":"https://api.github.com/users/joshwget/orgs","repos_url":"https://api.github.com/users/joshwget/repos","events_url":"https://api.github.com/users/joshwget/events{/privacy}","received_events_url":"https://api.github.com/users/joshwget/received_events","type":"User","site_admin":false},"body":"Adds a framework to specify a set of parsing-related options. Currently it allows disabling interpolation/validation and adds hooks for preprocessing and postprocessing configs. Being able to specify a custom schema is something I'm hoping to add to this soon.\r\n\r\nSigned-off-by: Josh Curl <josh@curl.me>","created_at":"2016-05-12T16:26:12Z","updated_at":"2016-05-18T16:28:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68ee9a786fa18fb2b3d4f0674ad9fb31d6a06797","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/libcompose/pulls/259/commits","review_comments_url":"https://api.github.com/repos/docker/libcompose/pulls/259/comments","review_comment_url":"https://api.github.com/repos/docker/libcompose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/libcompose/issues/259/comments","statuses_url":"https://api.github.com/repos/docker/libcompose/statuses/586ac5ff1b114a9a32ef7429a9a524d99cc5ed78","head":{"label":"joshwget:parsing-options","ref":"parsing-options","sha":"586ac5ff1b114a9a32ef7429a9a524d99cc5ed78","user":{"login":"joshwget","id":6208550,"avatar_url":"https://avatars.githubusercontent.com/u/6208550?v=3","gravatar_id":"","url":"https://api.github.com/users/joshwget","html_url":"https://github.com/joshwget","followers_url":"https://api.github.com/users/joshwget/followers","following_url":"https://api.github.com/users/joshwget/following{/other_user}","gists_url":"https://api.github.com/users/joshwget/gists{/gist_id}","starred_url":"https://api.github.com/users/joshwget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshwget/subscriptions","organizations_url":"https://api.github.com/users/joshwget/orgs","repos_url":"https://api.github.com/users/joshwget/repos","events_url":"https://api.github.com/users/joshwget/events{/privacy}","received_events_url":"https://api.github.com/users/joshwget/received_events","type":"User","site_admin":false},"repo":{"id":41385015,"name":"libcompose","full_name":"joshwget/libcompose","owner":{"login":"joshwget","id":6208550,"avatar_url":"https://avatars.githubusercontent.com/u/6208550?v=3","gravatar_id":"","url":"https://api.github.com/users/joshwget","html_url":"https://github.com/joshwget","followers_url":"https://api.github.com/users/joshwget/followers","following_url":"https://api.github.com/users/joshwget/following{/other_user}","gists_url":"https://api.github.com/users/joshwget/gists{/gist_id}","starred_url":"https://api.github.com/users/joshwget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshwget/subscriptions","organizations_url":"https://api.github.com/users/joshwget/orgs","repos_url":"https://api.github.com/users/joshwget/repos","events_url":"https://api.github.com/users/joshwget/events{/privacy}","received_events_url":"https://api.github.com/users/joshwget/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshwget/libcompose","description":"","fork":true,"url":"https://api.github.com/repos/joshwget/libcompose","forks_url":"https://api.github.com/repos/joshwget/libcompose/forks","keys_url":"https://api.github.com/repos/joshwget/libcompose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshwget/libcompose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshwget/libcompose/teams","hooks_url":"https://api.github.com/repos/joshwget/libcompose/hooks","issue_events_url":"https://api.github.com/repos/joshwget/libcompose/issues/events{/number}","events_url":"https://api.github.com/repos/joshwget/libcompose/events","assignees_url":"https://api.github.com/repos/joshwget/libcompose/assignees{/user}","branches_url":"https://api.github.com/repos/joshwget/libcompose/branches{/branch}","tags_url":"https://api.github.com/repos/joshwget/libcompose/tags","blobs_url":"https://api.github.com/repos/joshwget/libcompose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshwget/libcompose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshwget/libcompose/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshwget/libcompose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshwget/libcompose/statuses/{sha}","languages_url":"https://api.github.com/repos/joshwget/libcompose/languages","stargazers_url":"https://api.github.com/repos/joshwget/libcompose/stargazers","contributors_url":"https://api.github.com/repos/joshwget/libcompose/contributors","subscribers_url":"https://api.github.com/repos/joshwget/libcompose/subscribers","subscription_url":"https://api.github.com/repos/joshwget/libcompose/subscription","commits_url":"https://api.github.com/repos/joshwget/libcompose/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshwget/libcompose/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshwget/libcompose/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshwget/libcompose/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshwget/libcompose/contents/{+path}","compare_url":"https://api.github.com/repos/joshwget/libcompose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshwget/libcompose/merges","archive_url":"https://api.github.com/repos/joshwget/libcompose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshwget/libcompose/downloads","issues_url":"https://api.github.com/repos/joshwget/libcompose/issues{/number}","pulls_url":"https://api.github.com/repos/joshwget/libcompose/pulls{/number}","milestones_url":"https://api.github.com/repos/joshwget/libcompose/milestones{/number}","notifications_url":"https://api.github.com/repos/joshwget/libcompose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshwget/libcompose/labels{/name}","releases_url":"https://api.github.com/repos/joshwget/libcompose/releases{/id}","deployments_url":"https://api.github.com/repos/joshwget/libcompose/deployments","created_at":"2015-08-25T19:59:16Z","updated_at":"2015-08-25T19:59:17Z","pushed_at":"2016-05-17T18:21:21Z","git_url":"git://github.com/joshwget/libcompose.git","ssh_url":"git@github.com:joshwget/libcompose.git","clone_url":"https://github.com/joshwget/libcompose.git","svn_url":"https://github.com/joshwget/libcompose","homepage":null,"size":2916,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"8ee7bcc364f7b8194581a3c6bd9fa019467c7873","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":35969237,"name":"libcompose","full_name":"docker/libcompose","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/libcompose","description":"An experimental go library providing Compose-like functionality","fork":false,"url":"https://api.github.com/repos/docker/libcompose","forks_url":"https://api.github.com/repos/docker/libcompose/forks","keys_url":"https://api.github.com/repos/docker/libcompose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/libcompose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/libcompose/teams","hooks_url":"https://api.github.com/repos/docker/libcompose/hooks","issue_events_url":"https://api.github.com/repos/docker/libcompose/issues/events{/number}","events_url":"https://api.github.com/repos/docker/libcompose/events","assignees_url":"https://api.github.com/repos/docker/libcompose/assignees{/user}","branches_url":"https://api.github.com/repos/docker/libcompose/branches{/branch}","tags_url":"https://api.github.com/repos/docker/libcompose/tags","blobs_url":"https://api.github.com/repos/docker/libcompose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/libcompose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/libcompose/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/libcompose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/libcompose/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/libcompose/languages","stargazers_url":"https://api.github.com/repos/docker/libcompose/stargazers","contributors_url":"https://api.github.com/repos/docker/libcompose/contributors","subscribers_url":"https://api.github.com/repos/docker/libcompose/subscribers","subscription_url":"https://api.github.com/repos/docker/libcompose/subscription","commits_url":"https://api.github.com/repos/docker/libcompose/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/libcompose/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/libcompose/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/libcompose/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/libcompose/contents/{+path}","compare_url":"https://api.github.com/repos/docker/libcompose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/libcompose/merges","archive_url":"https://api.github.com/repos/docker/libcompose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/libcompose/downloads","issues_url":"https://api.github.com/repos/docker/libcompose/issues{/number}","pulls_url":"https://api.github.com/repos/docker/libcompose/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/libcompose/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/libcompose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/libcompose/labels{/name}","releases_url":"https://api.github.com/repos/docker/libcompose/releases{/id}","deployments_url":"https://api.github.com/repos/docker/libcompose/deployments","created_at":"2015-05-20T19:22:20Z","updated_at":"2016-05-17T20:00:44Z","pushed_at":"2016-05-18T07:49:50Z","git_url":"git://github.com/docker/libcompose.git","ssh_url":"git@github.com:docker/libcompose.git","clone_url":"https://github.com/docker/libcompose.git","svn_url":"https://github.com/docker/libcompose","homepage":"https://godoc.org/github.com/docker/libcompose","size":3145,"stargazers_count":304,"watchers_count":304,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":53,"forks":63,"open_issues":53,"watchers":304,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/libcompose/pulls/259"},"html":{"href":"https://github.com/docker/libcompose/pull/259"},"issue":{"href":"https://api.github.com/repos/docker/libcompose/issues/259"},"comments":{"href":"https://api.github.com/repos/docker/libcompose/issues/259/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/libcompose/pulls/259/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/libcompose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/libcompose/pulls/259/commits"},"statuses":{"href":"https://api.github.com/repos/docker/libcompose/statuses/586ac5ff1b114a9a32ef7429a9a524d99cc5ed78"}}}}