{"action":"opened","number":143,"pull_request":{"url":"https://api.github.com/repos/jwilder/docker-gen/pulls/143","id":53941108,"html_url":"https://github.com/jwilder/docker-gen/pull/143","diff_url":"https://github.com/jwilder/docker-gen/pull/143.diff","patch_url":"https://github.com/jwilder/docker-gen/pull/143.patch","issue_url":"https://api.github.com/repos/jwilder/docker-gen/issues/143","number":143,"state":"open","locked":false,"title":"Add whereLabel* functions","user":{"login":"md5","id":76367,"avatar_url":"https://avatars.githubusercontent.com/u/76367?v=3","gravatar_id":"","url":"https://api.github.com/users/md5","html_url":"https://github.com/md5","followers_url":"https://api.github.com/users/md5/followers","following_url":"https://api.github.com/users/md5/following{/other_user}","gists_url":"https://api.github.com/users/md5/gists{/gist_id}","starred_url":"https://api.github.com/users/md5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/md5/subscriptions","organizations_url":"https://api.github.com/users/md5/orgs","repos_url":"https://api.github.com/users/md5/repos","events_url":"https://api.github.com/users/md5/events{/privacy}","received_events_url":"https://api.github.com/users/md5/received_events","type":"User","site_admin":false},"body":"This PR adds a few functions from the `whereLabel*` family:\r\n\r\n* `whereLabelExists`\r\n* `whereLabelDoesNotExist`\r\n* `whereLabelValueMatches`\r\n\r\nThis should help with situations like those mentioned in https://github.com/jwilder/docker-gen/pull/82#issuecomment-158323192\r\n\r\nRight now, these functions are strictly for `[]*RuntimeContainer`, but they could be adjusted to work in other situations if need be. I could also see adding a `hasLabel` function that takes `*RuntimeContainer` or exposing the `regexp.MatchString` function used by `whereLabelValueMatches`, but I wanted to keep this PR simple and focused.","created_at":"2015-12-17T06:59:09Z","updated_at":"2015-12-17T06:59:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jwilder/docker-gen/pulls/143/commits","review_comments_url":"https://api.github.com/repos/jwilder/docker-gen/pulls/143/comments","review_comment_url":"https://api.github.com/repos/jwilder/docker-gen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jwilder/docker-gen/issues/143/comments","statuses_url":"https://api.github.com/repos/jwilder/docker-gen/statuses/6fcdbfec52055256838c32d314441db8780094e4","head":{"label":"appropriate:where-label-functions","ref":"where-label-functions","sha":"6fcdbfec52055256838c32d314441db8780094e4","user":{"login":"appropriate","id":11153133,"avatar_url":"https://avatars.githubusercontent.com/u/11153133?v=3","gravatar_id":"","url":"https://api.github.com/users/appropriate","html_url":"https://github.com/appropriate","followers_url":"https://api.github.com/users/appropriate/followers","following_url":"https://api.github.com/users/appropriate/following{/other_user}","gists_url":"https://api.github.com/users/appropriate/gists{/gist_id}","starred_url":"https://api.github.com/users/appropriate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appropriate/subscriptions","organizations_url":"https://api.github.com/users/appropriate/orgs","repos_url":"https://api.github.com/users/appropriate/repos","events_url":"https://api.github.com/users/appropriate/events{/privacy}","received_events_url":"https://api.github.com/users/appropriate/received_events","type":"Organization","site_admin":false},"repo":{"id":25758281,"name":"docker-gen","full_name":"appropriate/docker-gen","owner":{"login":"appropriate","id":11153133,"avatar_url":"https://avatars.githubusercontent.com/u/11153133?v=3","gravatar_id":"","url":"https://api.github.com/users/appropriate","html_url":"https://github.com/appropriate","followers_url":"https://api.github.com/users/appropriate/followers","following_url":"https://api.github.com/users/appropriate/following{/other_user}","gists_url":"https://api.github.com/users/appropriate/gists{/gist_id}","starred_url":"https://api.github.com/users/appropriate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appropriate/subscriptions","organizations_url":"https://api.github.com/users/appropriate/orgs","repos_url":"https://api.github.com/users/appropriate/repos","events_url":"https://api.github.com/users/appropriate/events{/privacy}","received_events_url":"https://api.github.com/users/appropriate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appropriate/docker-gen","description":"Generate files from docker container meta-data","fork":true,"url":"https://api.github.com/repos/appropriate/docker-gen","forks_url":"https://api.github.com/repos/appropriate/docker-gen/forks","keys_url":"https://api.github.com/repos/appropriate/docker-gen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appropriate/docker-gen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appropriate/docker-gen/teams","hooks_url":"https://api.github.com/repos/appropriate/docker-gen/hooks","issue_events_url":"https://api.github.com/repos/appropriate/docker-gen/issues/events{/number}","events_url":"https://api.github.com/repos/appropriate/docker-gen/events","assignees_url":"https://api.github.com/repos/appropriate/docker-gen/assignees{/user}","branches_url":"https://api.github.com/repos/appropriate/docker-gen/branches{/branch}","tags_url":"https://api.github.com/repos/appropriate/docker-gen/tags","blobs_url":"https://api.github.com/repos/appropriate/docker-gen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appropriate/docker-gen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appropriate/docker-gen/git/refs{/sha}","trees_url":"https://api.github.com/repos/appropriate/docker-gen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appropriate/docker-gen/statuses/{sha}","languages_url":"https://api.github.com/repos/appropriate/docker-gen/languages","stargazers_url":"https://api.github.com/repos/appropriate/docker-gen/stargazers","contributors_url":"https://api.github.com/repos/appropriate/docker-gen/contributors","subscribers_url":"https://api.github.com/repos/appropriate/docker-gen/subscribers","subscription_url":"https://api.github.com/repos/appropriate/docker-gen/subscription","commits_url":"https://api.github.com/repos/appropriate/docker-gen/commits{/sha}","git_commits_url":"https://api.github.com/repos/appropriate/docker-gen/git/commits{/sha}","comments_url":"https://api.github.com/repos/appropriate/docker-gen/comments{/number}","issue_comment_url":"https://api.github.com/repos/appropriate/docker-gen/issues/comments{/number}","contents_url":"https://api.github.com/repos/appropriate/docker-gen/contents/{+path}","compare_url":"https://api.github.com/repos/appropriate/docker-gen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appropriate/docker-gen/merges","archive_url":"https://api.github.com/repos/appropriate/docker-gen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appropriate/docker-gen/downloads","issues_url":"https://api.github.com/repos/appropriate/docker-gen/issues{/number}","pulls_url":"https://api.github.com/repos/appropriate/docker-gen/pulls{/number}","milestones_url":"https://api.github.com/repos/appropriate/docker-gen/milestones{/number}","notifications_url":"https://api.github.com/repos/appropriate/docker-gen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appropriate/docker-gen/labels{/name}","releases_url":"https://api.github.com/repos/appropriate/docker-gen/releases{/id}","created_at":"2014-10-26T05:15:55Z","updated_at":"2015-05-02T04:30:19Z","pushed_at":"2015-12-17T06:55:42Z","git_url":"git://github.com/appropriate/docker-gen.git","ssh_url":"git@github.com:appropriate/docker-gen.git","clone_url":"https://github.com/appropriate/docker-gen.git","svn_url":"https://github.com/appropriate/docker-gen","homepage":null,"size":6627,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"jwilder:master","ref":"master","sha":"7c84209cb3fb66dbef6813985d0065858b0f44d7","user":{"login":"jwilder","id":219935,"avatar_url":"https://avatars.githubusercontent.com/u/219935?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilder","html_url":"https://github.com/jwilder","followers_url":"https://api.github.com/users/jwilder/followers","following_url":"https://api.github.com/users/jwilder/following{/other_user}","gists_url":"https://api.github.com/users/jwilder/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilder/subscriptions","organizations_url":"https://api.github.com/users/jwilder/orgs","repos_url":"https://api.github.com/users/jwilder/repos","events_url":"https://api.github.com/users/jwilder/events{/privacy}","received_events_url":"https://api.github.com/users/jwilder/received_events","type":"User","site_admin":false},"repo":{"id":17762549,"name":"docker-gen","full_name":"jwilder/docker-gen","owner":{"login":"jwilder","id":219935,"avatar_url":"https://avatars.githubusercontent.com/u/219935?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilder","html_url":"https://github.com/jwilder","followers_url":"https://api.github.com/users/jwilder/followers","following_url":"https://api.github.com/users/jwilder/following{/other_user}","gists_url":"https://api.github.com/users/jwilder/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilder/subscriptions","organizations_url":"https://api.github.com/users/jwilder/orgs","repos_url":"https://api.github.com/users/jwilder/repos","events_url":"https://api.github.com/users/jwilder/events{/privacy}","received_events_url":"https://api.github.com/users/jwilder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jwilder/docker-gen","description":"Generate files from docker container meta-data","fork":false,"url":"https://api.github.com/repos/jwilder/docker-gen","forks_url":"https://api.github.com/repos/jwilder/docker-gen/forks","keys_url":"https://api.github.com/repos/jwilder/docker-gen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwilder/docker-gen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwilder/docker-gen/teams","hooks_url":"https://api.github.com/repos/jwilder/docker-gen/hooks","issue_events_url":"https://api.github.com/repos/jwilder/docker-gen/issues/events{/number}","events_url":"https://api.github.com/repos/jwilder/docker-gen/events","assignees_url":"https://api.github.com/repos/jwilder/docker-gen/assignees{/user}","branches_url":"https://api.github.com/repos/jwilder/docker-gen/branches{/branch}","tags_url":"https://api.github.com/repos/jwilder/docker-gen/tags","blobs_url":"https://api.github.com/repos/jwilder/docker-gen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwilder/docker-gen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwilder/docker-gen/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwilder/docker-gen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwilder/docker-gen/statuses/{sha}","languages_url":"https://api.github.com/repos/jwilder/docker-gen/languages","stargazers_url":"https://api.github.com/repos/jwilder/docker-gen/stargazers","contributors_url":"https://api.github.com/repos/jwilder/docker-gen/contributors","subscribers_url":"https://api.github.com/repos/jwilder/docker-gen/subscribers","subscription_url":"https://api.github.com/repos/jwilder/docker-gen/subscription","commits_url":"https://api.github.com/repos/jwilder/docker-gen/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwilder/docker-gen/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwilder/docker-gen/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwilder/docker-gen/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwilder/docker-gen/contents/{+path}","compare_url":"https://api.github.com/repos/jwilder/docker-gen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwilder/docker-gen/merges","archive_url":"https://api.github.com/repos/jwilder/docker-gen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwilder/docker-gen/downloads","issues_url":"https://api.github.com/repos/jwilder/docker-gen/issues{/number}","pulls_url":"https://api.github.com/repos/jwilder/docker-gen/pulls{/number}","milestones_url":"https://api.github.com/repos/jwilder/docker-gen/milestones{/number}","notifications_url":"https://api.github.com/repos/jwilder/docker-gen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwilder/docker-gen/labels{/name}","releases_url":"https://api.github.com/repos/jwilder/docker-gen/releases{/id}","created_at":"2014-03-14T22:34:35Z","updated_at":"2015-12-17T02:28:27Z","pushed_at":"2015-12-16T22:35:08Z","git_url":"git://github.com/jwilder/docker-gen.git","ssh_url":"git@github.com:jwilder/docker-gen.git","clone_url":"https://github.com/jwilder/docker-gen.git","svn_url":"https://github.com/jwilder/docker-gen","homepage":null,"size":4821,"stargazers_count":1066,"watchers_count":1066,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":138,"mirror_url":null,"open_issues_count":32,"forks":138,"open_issues":32,"watchers":1066,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jwilder/docker-gen/pulls/143"},"html":{"href":"https://github.com/jwilder/docker-gen/pull/143"},"issue":{"href":"https://api.github.com/repos/jwilder/docker-gen/issues/143"},"comments":{"href":"https://api.github.com/repos/jwilder/docker-gen/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/jwilder/docker-gen/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/jwilder/docker-gen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jwilder/docker-gen/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/jwilder/docker-gen/statuses/6fcdbfec52055256838c32d314441db8780094e4"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":163,"deletions":34,"changed_files":3}}