{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/26787031","id":26787031,"diff_hunk":"@@ -0,0 +1,243 @@\n+package generator\n+\n+import (\n+\t\"fmt\"\n+\n+\t\"github.com/golang/glog\"\n+\n+\tkapi \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/util\"\n+\tbuildapi \"github.com/openshift/origin/pkg/build/api\"\n+\timageapi \"github.com/openshift/origin/pkg/image/api\"\n+)\n+\n+// BuildGenerator is a central place responsible for generating new Build objects\n+// from BuildConfigs and other Builds.\n+type BuildGenerator struct {\n+\tClient GeneratorClient\n+}\n+\n+type GeneratorClient interface {\n+\tGetBuildConfig(ctx kapi.Context, name string) (*buildapi.BuildConfig, error)\n+\tUpdateBuildConfig(ctx kapi.Context, buildConfig *buildapi.BuildConfig) error\n+\tGetBuild(ctx kapi.Context, name string) (*buildapi.Build, error)\n+\tCreateBuild(ctx kapi.Context, build *buildapi.Build) error\n+\tGetImageRepository(ctx kapi.Context, name string) (*imageapi.ImageRepository, error)\n+}\n+\n+type Client struct {\n+\tGetBuildConfigFunc     func(ctx kapi.Context, name string) (*buildapi.BuildConfig, error)\n+\tUpdateBuildConfigFunc  func(ctx kapi.Context, buildConfig *buildapi.BuildConfig) error\n+\tGetBuildFunc           func(ctx kapi.Context, name string) (*buildapi.Build, error)\n+\tCreateBuildFunc        func(ctx kapi.Context, build *buildapi.Build) error\n+\tGetImageRepositoryFunc func(ctx kapi.Context, name string) (*imageapi.ImageRepository, error)\n+}\n+\n+func (c Client) GetBuildConfig(ctx kapi.Context, name string) (*buildapi.BuildConfig, error) {\n+\treturn c.GetBuildConfigFunc(ctx, name)\n+}\n+\n+func (c Client) UpdateBuildConfig(ctx kapi.Context, buildConfig *buildapi.BuildConfig) error {\n+\treturn c.UpdateBuildConfigFunc(ctx, buildConfig)\n+}\n+\n+func (c Client) GetBuild(ctx kapi.Context, name string) (*buildapi.Build, error) {\n+\treturn c.GetBuildFunc(ctx, name)\n+}\n+\n+func (c Client) CreateBuild(ctx kapi.Context, build *buildapi.Build) error {\n+\treturn c.CreateBuildFunc(ctx, build)\n+}\n+\n+func (c Client) GetImageRepository(ctx kapi.Context, name string) (*imageapi.ImageRepository, error) {\n+\treturn c.GetImageRepositoryFunc(ctx, name)\n+}\n+\n+// Generate returns new Build object based on BuildRequest object\n+func (g *BuildGenerator) Generate(ctx kapi.Context, request *buildapi.BuildRequest) (*buildapi.Build, error) {\n+\tvar newBuild *buildapi.Build\n+\tif len(request.BuildConfigName) > 0 {\n+\t\tglog.Infof(\"Generating build for config %s\", request.BuildConfigName)\n+\t\tbc, err := g.Client.GetBuildConfig(ctx, request.BuildConfigName)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\t\tnewBuild, err = g.generateBuildFromConfig(ctx, bc, request.Revision)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\t\terr = g.Client.UpdateBuildConfig(ctx, bc)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\t} else {\n+\t\tglog.Infof(\"Generating build from build %s\", request.BuildName)\n+\t\tbuild, err := g.Client.GetBuild(ctx, request.BuildName)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\t\tnewBuild = generateBuildFromBuild(build)\n+\t}\n+\n+\tif !kapi.ValidNamespace(ctx, &newBuild.ObjectMeta) {\n+\t\treturn nil, errors.NewConflict(\"build\", newBuild.Namespace, fmt.Errorf(\"Build.Namespace does not match the provided context\"))\n+\t}\n+\tkapi.FillObjectMetaSystemFields(ctx, &newBuild.ObjectMeta)\n+\n+\terr := g.Client.CreateBuild(ctx, newBuild)\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\treturn g.Client.GetBuild(ctx, newBuild.Name)\n+}\n+\n+// generateBuildWithImageTag generates a build definition based on the current imageid\n+// from any ImageRepository that is associated to the BuildConfig by an ImageChangeTrigger.\n+// Takes a BuildConfig to base the build on, an optional SourceRevision to build.\n+// If there is a match in the image repo list, the resulting build will use\n+// the image tag from the corresponding image repo rather than the image field from the buildconfig\n+// as the base image for the build.\n+func (g *BuildGenerator) generateBuildFromConfig(ctx kapi.Context, bc *buildapi.BuildConfig, rev *buildapi.SourceRevision) (*buildapi.Build, error) {\n+\timageSubstitutions := make(map[string]string)\n+\tglog.Infof(\"Generating tagged build for config %s\", bc.Name)\n+\n+\tfor _, trigger := range bc.Triggers {\n+\t\tif trigger.Type != buildapi.ImageChangeBuildTriggerType {\n+\t\t\tcontinue\n+\t\t}\n+\t\ticTrigger := trigger.ImageChange\n+\t\tglog.Infof(\"Found image change trigger with reference to repo %s\", icTrigger.From.Name)\n+\n+\t\tvar namespace string\n+\t\tif len(icTrigger.From.Namespace) != 0 {\n+\t\t\tnamespace = icTrigger.From.Namespace\n+\t\t} else {\n+\t\t\tnamespace = bc.Namespace\n+\t\t}\n+\n+\t\timageRepo, err := g.Client.GetImageRepository(kapi.WithNamespace(ctx, namespace), icTrigger.From.Name)\n+\t\tif err != nil {\n+\t\t\tif errors.IsNotFound(err) {\n+\t\t\t\tcontinue\n+\t\t\t}\n+\t\t\treturn nil, err\n+\t\t}\n+\n+\t\tif imageRepo == nil || imageRepo.Status.DockerImageRepository == \"\" {\n+\t\t\tcontinue\n+\t\t}\n+\t\tglog.Infof(\"Found image repo %s\", imageRepo.Name)\n+\n+\t\t// for the ImageChange trigger, record the image it substitutes for and get the latest\n+\t\t// image id from the imagerepository.  We will substitute all images in the buildconfig\n+\t\t// with the latest values from the imagerepositories.\n+\t\ttag := icTrigger.Tag\n+\t\tglog.Info(len(tag))\n+\t\tif len(tag) == 0 {\n+\t\t\ttag = buildapi.DefaultImageTag\n+\t\t}\n+\t\tlatest, err := imageapi.LatestTaggedImage(imageRepo, tag)\n+\t\tif err != nil {\n+\t\t\tcontinue\n+\t\t}\n+\t\timageRef := latest.DockerImageReference\n+\t\tglog.Infof(\"Adding substitution %s with %s\", icTrigger.Image, imageRef)\n+\t\timageSubstitutions[icTrigger.Image] = imageRef\n+\t}\n+\n+\tglog.Infof(\"Generating build from config for build config %s\", bc.Name)\n+\t// Need to copy the buildConfig here so that it doesn't share pointers with\n+\t// the build object which could be (will be) modified later.\n+\tobj, _ := kapi.Scheme.Copy(bc)\n+\tbcCopy := obj.(*buildapi.BuildConfig)\n+\n+\tbuild := &buildapi.Build{\n+\t\tParameters: buildapi.BuildParameters{\n+\t\t\tSource:   bcCopy.Parameters.Source,\n+\t\t\tStrategy: bcCopy.Parameters.Strategy,\n+\t\t\tOutput:   bcCopy.Parameters.Output,\n+\t\t\tRevision: rev,\n+\t\t},\n+\t\tObjectMeta: kapi.ObjectMeta{\n+\t\t\tName:   getNextBuildName(bc),\n+\t\t\tLabels: bcCopy.Labels,\n+\t\t},\n+\t\tStatus: buildapi.BuildStatusNew,\n+\t}\n+\tif build.Labels == nil {\n+\t\tbuild.Labels = make(map[string]string)\n+\t}\n+\tbuild.Labels[buildapi.BuildConfigLabel] = bcCopy.Name\n+\n+\tfor originalImage, newImage := range imageSubstitutions {\n+\t\tglog.Infof(\"Substituting %s for %s\", newImage, originalImage)\n+\t\tsubstituteImageReferences(build, originalImage, newImage)\n+\t}\n+\treturn build, nil\n+}\n+\n+// substituteImageReferences replaces references to an image with a new value\n+func substituteImageReferences(build *buildapi.Build, oldImage string, newImage string) {\n+\tswitch {\n+\tcase build.Parameters.Strategy.Type == buildapi.DockerBuildStrategyType &&\n+\t\tbuild.Parameters.Strategy.DockerStrategy != nil &&\n+\t\tbuild.Parameters.Strategy.DockerStrategy.Image == oldImage:\n+\t\tbuild.Parameters.Strategy.DockerStrategy.Image = newImage\n+\tcase build.Parameters.Strategy.Type == buildapi.STIBuildStrategyType &&\n+\t\tbuild.Parameters.Strategy.STIStrategy != nil &&\n+\t\tbuild.Parameters.Strategy.STIStrategy.Image == oldImage:\n+\t\tbuild.Parameters.Strategy.STIStrategy.Image = newImage\n+\tcase build.Parameters.Strategy.Type == buildapi.CustomBuildStrategyType:\n+\t\t// update env variable references to the old image with the new image\n+\t\tstrategy := build.Parameters.Strategy.CustomStrategy\n+\t\tif strategy.Env == nil {\n+\t\t\tstrategy.Env = make([]kapi.EnvVar, 1)\n+\t\t\tstrategy.Env[0] = kapi.EnvVar{Name: buildapi.CustomBuildStrategyBaseImageKey, Value: newImage}\n+\t\t} else {\n+\t\t\tfound := false\n+\t\t\tfor i := range strategy.Env {\n+\t\t\t\tglog.Infof(\"Checking env variable %s %s\", strategy.Env[i].Name, strategy.Env[i].Value)\n+\t\t\t\tif strategy.Env[i].Name == buildapi.CustomBuildStrategyBaseImageKey {\n+\t\t\t\t\tfound = true\n+\t\t\t\t\tif strategy.Env[i].Value == oldImage {\n+\t\t\t\t\t\tstrategy.Env[i].Value = newImage\n+\t\t\t\t\t\tglog.Infof(\"Updated env variable %s %s\", strategy.Env[i].Name, strategy.Env[i].Value)\n+\t\t\t\t\t\tbreak\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\tif !found {\n+\t\t\t\tstrategy.Env = append(strategy.Env, kapi.EnvVar{Name: buildapi.CustomBuildStrategyBaseImageKey, Value: newImage})\n+\t\t\t}\n+\t\t}\n+\t\t// update the actual custom build image with the new image, if applicable\n+\t\tif strategy.Image == oldImage {\n+\t\t\tstrategy.Image = newImage\n+\t\t}\n+\t}\n+}\n+\n+// getNextBuildName returns name of the next build and increments BuildConfig's LastVersion.\n+func getNextBuildName(bc *buildapi.BuildConfig) string {\n+\tbc.LastVersion++\n+\treturn fmt.Sprintf(\"%s-%d\", bc.Name, bc.LastVersion)\n+}\n+\n+// generateBuildFromBuild creates a new build based on a given Build.\n+func generateBuildFromBuild(build *buildapi.Build) *buildapi.Build {\n+\tobj, _ := kapi.Scheme.Copy(build)\n+\tbuildCopy := obj.(*buildapi.Build)\n+\treturn &buildapi.Build{\n+\t\tParameters: buildCopy.Parameters,\n+\t\tObjectMeta: kapi.ObjectMeta{\n+\t\t\tName:   getNextBuildNameFromBuild(buildCopy),\n+\t\t\tLabels: buildCopy.ObjectMeta.Labels,\n+\t\t},\n+\t}\n+}\n+\n+// getNextBuildNameFromBuild returns name of the next build with random uuid added at the end\n+func getNextBuildNameFromBuild(build *buildapi.Build) string {\n+\treturn fmt.Sprintf(\"%s-%d\", build.Name, int32(util.Now().Unix()))","path":"pkg/build/generator/generator.go","position":242,"original_position":242,"commit_id":"cf5931ae02dd2b5d00f7c1c5ad7dc5c130c5ba52","original_commit_id":"cf5931ae02dd2b5d00f7c1c5ad7dc5c130c5ba52","user":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"body":"if i generate a build from a build that was generated from a build, i'm going to end up with a mess.  you should strip the previous timestamp(if present) from the buildname when generating a build from a build.\r\n","created_at":"2015-03-19T19:03:57Z","updated_at":"2015-03-19T19:03:57Z","html_url":"https://github.com/openshift/origin/pull/1275#discussion_r26787031","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/1275","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/26787031"},"html":{"href":"https://github.com/openshift/origin/pull/1275#discussion_r26787031"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/1275"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/1275","id":30898967,"html_url":"https://github.com/openshift/origin/pull/1275","diff_url":"https://github.com/openshift/origin/pull/1275.diff","patch_url":"https://github.com/openshift/origin/pull/1275.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/1275","number":1275,"state":"open","locked":false,"title":"Rework builds","user":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"body":"This PR includes:\r\n* [x] `Build`'s `PodName` removal #408\r\n* [x] Adding number to builds #528, #333 \r\n* [x] Copying labels from `Build` to build `Pod`\r\n","created_at":"2015-03-10T22:25:27Z","updated_at":"2015-03-19T19:03:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"057728482c0d8c2a7ebb3024f2ce8c87c8c06e88","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/1275/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/1275/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/1275/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/cf5931ae02dd2b5d00f7c1c5ad7dc5c130c5ba52","head":{"label":"soltysh:build_rework","ref":"build_rework","sha":"cf5931ae02dd2b5d00f7c1c5ad7dc5c130c5ba52","user":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"repo":{"id":22954476,"name":"origin","full_name":"soltysh/origin","owner":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/soltysh/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/soltysh/origin","forks_url":"https://api.github.com/repos/soltysh/origin/forks","keys_url":"https://api.github.com/repos/soltysh/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soltysh/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soltysh/origin/teams","hooks_url":"https://api.github.com/repos/soltysh/origin/hooks","issue_events_url":"https://api.github.com/repos/soltysh/origin/issues/events{/number}","events_url":"https://api.github.com/repos/soltysh/origin/events","assignees_url":"https://api.github.com/repos/soltysh/origin/assignees{/user}","branches_url":"https://api.github.com/repos/soltysh/origin/branches{/branch}","tags_url":"https://api.github.com/repos/soltysh/origin/tags","blobs_url":"https://api.github.com/repos/soltysh/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soltysh/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soltysh/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/soltysh/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soltysh/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/soltysh/origin/languages","stargazers_url":"https://api.github.com/repos/soltysh/origin/stargazers","contributors_url":"https://api.github.com/repos/soltysh/origin/contributors","subscribers_url":"https://api.github.com/repos/soltysh/origin/subscribers","subscription_url":"https://api.github.com/repos/soltysh/origin/subscription","commits_url":"https://api.github.com/repos/soltysh/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/soltysh/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/soltysh/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/soltysh/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/soltysh/origin/contents/{+path}","compare_url":"https://api.github.com/repos/soltysh/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soltysh/origin/merges","archive_url":"https://api.github.com/repos/soltysh/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soltysh/origin/downloads","issues_url":"https://api.github.com/repos/soltysh/origin/issues{/number}","pulls_url":"https://api.github.com/repos/soltysh/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/soltysh/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/soltysh/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soltysh/origin/labels{/name}","releases_url":"https://api.github.com/repos/soltysh/origin/releases{/id}","created_at":"2014-08-14T13:19:11Z","updated_at":"2015-03-19T16:25:29Z","pushed_at":"2015-03-19T16:25:29Z","git_url":"git://github.com/soltysh/origin.git","ssh_url":"git@github.com:soltysh/origin.git","clone_url":"https://github.com/soltysh/origin.git","svn_url":"https://github.com/soltysh/origin","homepage":"https://openshift.github.io","size":50808,"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":"ec1011ae1a1959be65d2940b53bb648160fdbc43","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-03-19T18:55:53Z","pushed_at":"2015-03-19T18:55:52Z","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":76454,"stargazers_count":316,"watchers_count":316,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":168,"mirror_url":null,"open_issues_count":130,"forks":168,"open_issues":130,"watchers":316,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/1275"},"html":{"href":"https://github.com/openshift/origin/pull/1275"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/1275"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/1275/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/1275/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/1275/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/cf5931ae02dd2b5d00f7c1c5ad7dc5c130c5ba52"}}}}