{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/31294985","id":31294985,"diff_hunk":"@@ -0,0 +1,344 @@\n+package controllers\n+\n+import (\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\t\"reflect\"\n+\t\"strings\"\n+\t\"sync\"\n+\t\"time\"\n+\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/api\"\n+\tkapierrors \"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/client\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/controller/framework\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/credentialprovider\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/fields\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/labels\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/secret\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/util\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/util/wait\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/watch\"\n+\t\"github.com/golang/glog\"\n+)\n+\n+const ServiceAccountTokenSecretNameKey = \"openshift.io/token-secret.name\"\n+const OpenshiftDockerURL = \"docker-registry.default.svc.cluster.local\"\n+\n+// DockercfgControllerOptions contains options for the DockercfgController\n+type DockercfgControllerOptions struct {\n+\t// Resync is the time.Duration at which to fully re-list service accounts.\n+\t// If zero, re-list will be delayed as long as possible\n+\tResync time.Duration\n+}\n+\n+// NewDockercfgController returns a new *DockercfgController.\n+func NewDockercfgController(cl client.Interface, options DockercfgControllerOptions) *DockercfgController {\n+\te := &DockercfgController{\n+\t\tclient: cl,\n+\t}\n+\n+\t_, e.serviceAccountController = framework.NewInformer(\n+\t\t&cache.ListWatch{\n+\t\t\tListFunc: func() (runtime.Object, error) {\n+\t\t\t\treturn e.client.ServiceAccounts(api.NamespaceAll).List(labels.Everything(), fields.Everything())\n+\t\t\t},\n+\t\t\tWatchFunc: func(rv string) (watch.Interface, error) {\n+\t\t\t\treturn e.client.ServiceAccounts(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), rv)\n+\t\t\t},\n+\t\t},\n+\t\t&api.ServiceAccount{},\n+\t\toptions.Resync,\n+\t\tframework.ResourceEventHandlerFuncs{\n+\t\t\tAddFunc:    e.serviceAccountAdded,\n+\t\t\tUpdateFunc: e.serviceAccountUpdated,\n+\t\t},\n+\t)\n+\n+\te.dockerURL = OpenshiftDockerURL\n+\n+\treturn e\n+}\n+\n+// DockercfgController manages dockercfg secrets for ServiceAccount objects\n+type DockercfgController struct {\n+\tstopChan chan struct{}\n+\n+\tclient client.Interface\n+\n+\tdockerURL     string\n+\tdockerURLLock sync.Mutex\n+\n+\tserviceAccountController *framework.Controller\n+}\n+\n+// Runs controller loops and returns immediately\n+func (e *DockercfgController) Run() {\n+\tif e.stopChan == nil {\n+\t\te.stopChan = make(chan struct{})\n+\t\tgo e.serviceAccountController.Run(e.stopChan)\n+\t}\n+}\n+\n+// Stop gracefully shuts down this controller\n+func (e *DockercfgController) Stop() {\n+\tif e.stopChan != nil {\n+\t\tclose(e.stopChan)\n+\t\te.stopChan = nil\n+\t}\n+}\n+\n+func (e *DockercfgController) SetDockerURL(newDockerURL string) {\n+\te.dockerURLLock.Lock()\n+\tdefer e.dockerURLLock.Unlock()\n+\n+\te.dockerURL = newDockerURL\n+}\n+\n+// serviceAccountAdded reacts to a ServiceAccount creation by creating a corresponding ServiceAccountToken Secret\n+func (e *DockercfgController) serviceAccountAdded(obj interface{}) {\n+\tserviceAccount := obj.(*api.ServiceAccount)\n+\n+\tif err := e.createDockercfgSecretIfNeeded(serviceAccount); err != nil {\n+\t\tglog.Error(err)\n+\t}\n+}\n+\n+// serviceAccountUpdated reacts to a ServiceAccount update (or re-list) by ensuring a corresponding ServiceAccountToken Secret exists\n+func (e *DockercfgController) serviceAccountUpdated(oldObj interface{}, newObj interface{}) {\n+\tnewServiceAccount := newObj.(*api.ServiceAccount)\n+\n+\tif err := e.createDockercfgSecretIfNeeded(newServiceAccount); err != nil {\n+\t\tglog.Error(err)\n+\t}\n+}\n+\n+const (\n+\tdockercfgToken = \"-dockercfg-\"\n+\n+\t// These constants are here to create a name that is short enough to survive chopping by generate name\n+\tmaxNameLength               = 63\n+\trandomLength                = 5\n+\tmaxServiceAccountNameLength = maxNameLength - randomLength - len(dockercfgToken)\n+)\n+\n+func getUsableServiceAccountNamePrefix(serviceAccountName string) string {\n+\tif len(serviceAccountName) > maxServiceAccountNameLength {\n+\t\tserviceAccountName = serviceAccountName[:maxServiceAccountNameLength]\n+\t}\n+\n+\treturn serviceAccountName\n+}\n+\n+func getDockercfgSecretNamePrefix(serviceAccount *api.ServiceAccount) string {\n+\treturn getUsableServiceAccountNamePrefix(serviceAccount.Name) + dockercfgToken\n+}\n+func getTokenSecretNamePrefix(serviceAccount *api.ServiceAccount) string {\n+\treturn getUsableServiceAccountNamePrefix(serviceAccount.Name) + \"-token-\"\n+}\n+\n+// createDockercfgSecretIfNeeded makes sure at least one ServiceAccountToken secret exists, and is included in the serviceAccount's Secrets list\n+func (e *DockercfgController) createDockercfgSecretIfNeeded(serviceAccount *api.ServiceAccount) error {\n+\n+\t// look for an ImagePullSecret in the form\n+\tdockercfgSecretName := \"\"\n+\tfoundDockercfgImagePullSecret := false\n+\tfor _, pullSecret := range serviceAccount.ImagePullSecrets {\n+\t\tif strings.HasPrefix(pullSecret.Name, getDockercfgSecretNamePrefix(serviceAccount)) {\n+\t\t\tfoundDockercfgImagePullSecret = true\n+\t\t\tdockercfgSecretName = pullSecret.Name\n+\t\t\tbreak\n+\t\t}\n+\t}\n+\tfoundDockercfgMountableSecret := false\n+\tfor _, mountableSecret := range serviceAccount.Secrets {\n+\t\tif strings.HasPrefix(mountableSecret.Name, getDockercfgSecretNamePrefix(serviceAccount)) {\n+\t\t\tfoundDockercfgMountableSecret = true\n+\t\t\tdockercfgSecretName = mountableSecret.Name\n+\t\t\tbreak\n+\t\t}\n+\t}\n+\n+\tswitch {\n+\t// if we already have a docker pull secret, simply return\n+\tcase foundDockercfgImagePullSecret && foundDockercfgMountableSecret:\n+\t\treturn nil\n+\n+\tcase foundDockercfgImagePullSecret && !foundDockercfgMountableSecret, !foundDockercfgImagePullSecret && foundDockercfgMountableSecret:\n+\t\tstaleDecision, err := e.createDockerPullSecretReference(serviceAccount, dockercfgSecretName)\n+\t\tif staleDecision || kapierrors.IsConflict(err) {\n+\t\t\t// nothing to do.  Our choice was stale or we got a conflict.  Either way that means that the service account was updated.  We simply need to return because we'll get an update notification later\n+\t\t\treturn nil\n+\t\t}\n+\n+\t\treturn err\n+\n+\t}\n+\n+\t// if we get here, then we need to create a new dockercfg secret\n+\tdockercfgSecret, err := e.createDockerPullSecret(serviceAccount)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\n+\tstaleDecision, err := e.createDockerPullSecretReference(serviceAccount, dockercfgSecret.Name)\n+\tif staleDecision || kapierrors.IsConflict(err) {\n+\t\t// nothing to do.  Our choice was stale or we got a conflict.  Either way that means that the service account was updated.  We simply need to return because we'll get an update notification later\n+\t\t// we do need to clean up our dockercfgSecret.  token secrets are cleaned up by the controller handling service account dockercfg secret deletes\n+\t\tif err := e.client.Secrets(dockercfgSecret.Namespace).Delete(dockercfgSecret.Name); err != nil {\n+\t\t\tglog.Error(err)\n+\t\t}\n+\t\treturn nil\n+\t}\n+\n+\treturn err\n+}\n+\n+// createDockerPullSecretReference updates a service account to reference the dockercfgSecret as a Secret and an ImagePullSecret\n+func (e *DockercfgController) createDockerPullSecretReference(staleServiceAccount *api.ServiceAccount, dockercfgSecretName string) ( /*isStale*/ bool, error) {","path":"pkg/serviceaccounts/controllers/create_dockercfg_secrets.go","position":200,"original_position":200,"commit_id":"17f92833228fe3b988b019eff15261b93127c23c","original_commit_id":"17f92833228fe3b988b019eff15261b93127c23c","user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"body":"simplify to just return an error, and return `kapierrors.NewConflict()` in stale cases?","created_at":"2015-05-29T02:22:20Z","updated_at":"2015-05-29T02:22:20Z","html_url":"https://github.com/openshift/origin/pull/2507#discussion_r31294985","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/2507","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/31294985"},"html":{"href":"https://github.com/openshift/origin/pull/2507#discussion_r31294985"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/2507"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/2507","id":36239039,"html_url":"https://github.com/openshift/origin/pull/2507","diff_url":"https://github.com/openshift/origin/pull/2507.diff","patch_url":"https://github.com/openshift/origin/pull/2507.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/2507","number":2507,"state":"open","locked":false,"title":"auto-generate dockercfg secrets for service accounts","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"This adds a new service account controller that watches for added or deleted service account tokens and creates or deletes corresponding dockercfg secrets accordingly.  It automatically adds/removes references to the service accounts pull secrets and mountable secrets lists.\r\n\r\n@liggitt ptal","created_at":"2015-05-26T19:54:02Z","updated_at":"2015-05-29T02:22:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf85298b75ed84d0e5e00b04b537fd910eee6dc4","assignee":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/openshift/origin/milestones/4","html_url":"https://github.com/openshift/origin/milestones/0.6.0","labels_url":"https://api.github.com/repos/openshift/origin/milestones/4/labels","id":1057504,"number":4,"title":"0.6.0","description":"","creator":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":32,"state":"open","created_at":"2015-04-08T03:08:19Z","updated_at":"2015-05-28T23:13:33Z","due_on":"2015-06-15T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/openshift/origin/pulls/2507/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/2507/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/2507/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/17f92833228fe3b988b019eff15261b93127c23c","head":{"label":"deads2k:auto-generate-pull-secret","ref":"auto-generate-pull-secret","sha":"17f92833228fe3b988b019eff15261b93127c23c","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"repo":{"id":24424126,"name":"origin","full_name":"deads2k/origin","owner":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deads2k/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/deads2k/origin","forks_url":"https://api.github.com/repos/deads2k/origin/forks","keys_url":"https://api.github.com/repos/deads2k/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deads2k/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deads2k/origin/teams","hooks_url":"https://api.github.com/repos/deads2k/origin/hooks","issue_events_url":"https://api.github.com/repos/deads2k/origin/issues/events{/number}","events_url":"https://api.github.com/repos/deads2k/origin/events","assignees_url":"https://api.github.com/repos/deads2k/origin/assignees{/user}","branches_url":"https://api.github.com/repos/deads2k/origin/branches{/branch}","tags_url":"https://api.github.com/repos/deads2k/origin/tags","blobs_url":"https://api.github.com/repos/deads2k/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deads2k/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deads2k/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/deads2k/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deads2k/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/deads2k/origin/languages","stargazers_url":"https://api.github.com/repos/deads2k/origin/stargazers","contributors_url":"https://api.github.com/repos/deads2k/origin/contributors","subscribers_url":"https://api.github.com/repos/deads2k/origin/subscribers","subscription_url":"https://api.github.com/repos/deads2k/origin/subscription","commits_url":"https://api.github.com/repos/deads2k/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/deads2k/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/deads2k/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/deads2k/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/deads2k/origin/contents/{+path}","compare_url":"https://api.github.com/repos/deads2k/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deads2k/origin/merges","archive_url":"https://api.github.com/repos/deads2k/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deads2k/origin/downloads","issues_url":"https://api.github.com/repos/deads2k/origin/issues{/number}","pulls_url":"https://api.github.com/repos/deads2k/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/deads2k/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/deads2k/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deads2k/origin/labels{/name}","releases_url":"https://api.github.com/repos/deads2k/origin/releases{/id}","created_at":"2014-09-24T17:02:12Z","updated_at":"2015-05-08T15:45:28Z","pushed_at":"2015-05-28T19:58:15Z","git_url":"git://github.com/deads2k/origin.git","ssh_url":"git@github.com:deads2k/origin.git","clone_url":"https://github.com/deads2k/origin.git","svn_url":"https://github.com/deads2k/origin","homepage":"https://openshift.github.io","size":112034,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"openshift:master","ref":"master","sha":"84b3ba91612c712676bb689b95872f4121fc5b8e","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-05-28T21:42:42Z","pushed_at":"2015-05-29T02:21:31Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":174910,"stargazers_count":441,"watchers_count":441,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":220,"mirror_url":null,"open_issues_count":239,"forks":220,"open_issues":239,"watchers":441,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/2507"},"html":{"href":"https://github.com/openshift/origin/pull/2507"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/2507"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/2507/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/2507/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/2507/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/17f92833228fe3b988b019eff15261b93127c23c"}}}}