{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/58519640","id":58519640,"diff_hunk":"@@ -65,19 +75,88 @@ type BuildSpec struct {\n \t// Output describes the Docker image the Strategy should produce.\n \tOutput BuildOutput\n \n-\t// Compute resource requirements to execute the build\n+\t// Compute resource requirements to execute the build.\n \tResources kapi.ResourceRequirements\n \n \t// PostCommit is a build hook executed after the build output image is\n \t// committed, before it is pushed to a registry.\n \tPostCommit BuildPostCommitSpec\n \n-\t// Optional duration in seconds, counted from the time when a build pod gets\n-\t// scheduled in the system, that the build may be active on a node before the\n-\t// system actively tries to terminate the build; value must be positive integer\n+\t// Optional duration in seconds, counted from the time when a build pod\n+\t// gets scheduled in the system, that the build may be active on a node\n+\t// before the system actively tries to terminate the build; value must be\n+\t// positive integer.\n \tCompletionDeadlineSeconds *int64\n }\n \n+// BuildTriggerCause holds information about the trigger of a build.\n+type BuildTriggerCause struct {\n+\t// Reason is used to store a human readable reason for why the build was\n+\t// triggered. E.g.: \"Build manually triggered by user\", \"Build triggered by\n+\t// ConfigChange update\", \"Build triggered by ImageChange for image:\n+\t// FOO:BAR\", etc.\n+\t// TODO: Maybe this just be reworded to hold short \"codes\", while the human\n+\t// readable text is computed.\n+\tReason BuildTriggerReason\n+\n+\t// CIDetails holds information about the CI server job that triggered a\n+\t// specific build.\n+\tCIDetails *CIJobDetails\n+\n+\t// GitHubWebHook represents data for a GitHub webhook that fired a specific\n+\t// build.\n+\tGitHubWebHook *GitHubWebHookInfo\n+\n+\t// GenericWebHook holds data about a builds generic webhook trigger.\n+\tGenericWebHook *GenericWebHookTriggerInfo\n+\n+\t// ImageChangeBuild stores information about an imagechange event that\n+\t// triggered a new build.\n+\tImageChangeBuild *ImageChangeBuildInfo\n+}\n+\n+// BuildTriggerReason stores a human readable message about the cause of a\n+// triggered build.\n+type BuildTriggerReason string\n+\n+// CIJobDetails holds information about specific CI server jobs.\n+type CIJobDetails struct {\n+\tJenkinsDetails JenkinsJobDetails\n+}\n+\n+// JenkinsJobDetails holds information about a Jenkins job.\n+type JenkinsJobDetails struct {\n+\t// JobURL stores a link that points to a Jenkins job.\n+\tJobURL string // REVIEW: Maybe this should be a *url.URL.\n+}\n+\n+// GenericWebHookTriggerInfo holds information about a generic WebHook that\n+// triggered a build\n+type GenericWebHookTriggerInfo string\n+\n+// GitHubWebHookInfo has information about a GitHub webhook that triggered a\n+// build\n+type GitHubWebHookInfo struct {\n+\t// Source is the git source of the github webhook that triggered the\n+\t// build\n+\tSource GitBuildSource\n+\n+\t// Revision is the git revision of the github webhook that triggered the\n+\t// build\n+\tRevision GitSourceRevision\n+}\n+\n+// ImageChangeBuildInfo has information about the last imagechange trigger that\n+// fired a new build\n+type ImageChangeBuildInfo struct {\n+\t// ImageID is the image id that triggered the build\n+\tImageID string","path":"pkg/build/api/types.go","position":111,"original_position":111,"commit_id":"a8da66545a7f8f33b2b49ab1d1c21c26ccf5a443","original_commit_id":"a8da66545a7f8f33b2b49ab1d1c21c26ccf5a443","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"body":"is this really an ID or just \"name\", I thought we dropped 'ID' from API... @smarterclayton ?","created_at":"2016-04-05T11:05:15Z","updated_at":"2016-04-05T11:05:15Z","html_url":"https://github.com/openshift/origin/pull/7518#discussion_r58519640","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/7518","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/58519640"},"html":{"href":"https://github.com/openshift/origin/pull/7518#discussion_r58519640"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/7518"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/7518","id":60165268,"html_url":"https://github.com/openshift/origin/pull/7518","diff_url":"https://github.com/openshift/origin/pull/7518.diff","patch_url":"https://github.com/openshift/origin/pull/7518.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/7518","number":7518,"state":"open","locked":false,"title":"[WIP] Add build trigger information","user":{"login":"PI-Victor","id":6294120,"avatar_url":"https://avatars.githubusercontent.com/u/6294120?v=3","gravatar_id":"","url":"https://api.github.com/users/PI-Victor","html_url":"https://github.com/PI-Victor","followers_url":"https://api.github.com/users/PI-Victor/followers","following_url":"https://api.github.com/users/PI-Victor/following{/other_user}","gists_url":"https://api.github.com/users/PI-Victor/gists{/gist_id}","starred_url":"https://api.github.com/users/PI-Victor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PI-Victor/subscriptions","organizations_url":"https://api.github.com/users/PI-Victor/orgs","repos_url":"https://api.github.com/users/PI-Victor/repos","events_url":"https://api.github.com/users/PI-Victor/events{/privacy}","received_events_url":"https://api.github.com/users/PI-Victor/received_events","type":"User","site_admin":false},"body":"trello card: https://trello.com/c/wozDHSJ2/717-8-track-reason-a-build-was-run-triggered\r\n\r\nAdd build trigger information in the build object.\r\n\r\np.s. ignore the multiple commits, i'll squash\r\n\r\nSigned-off-by: pi-victor <ipalade@redhat.com>\r\n","created_at":"2016-02-22T12:22:30Z","updated_at":"2016-04-05T11:05:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e16877167e7c3f9fa557073ea5243ab6fa58651","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/7518/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/7518/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/7518/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/a8da66545a7f8f33b2b49ab1d1c21c26ccf5a443","head":{"label":"PI-Victor:pi-victor/track_build_trigger_reason","ref":"pi-victor/track_build_trigger_reason","sha":"a8da66545a7f8f33b2b49ab1d1c21c26ccf5a443","user":{"login":"PI-Victor","id":6294120,"avatar_url":"https://avatars.githubusercontent.com/u/6294120?v=3","gravatar_id":"","url":"https://api.github.com/users/PI-Victor","html_url":"https://github.com/PI-Victor","followers_url":"https://api.github.com/users/PI-Victor/followers","following_url":"https://api.github.com/users/PI-Victor/following{/other_user}","gists_url":"https://api.github.com/users/PI-Victor/gists{/gist_id}","starred_url":"https://api.github.com/users/PI-Victor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PI-Victor/subscriptions","organizations_url":"https://api.github.com/users/PI-Victor/orgs","repos_url":"https://api.github.com/users/PI-Victor/repos","events_url":"https://api.github.com/users/PI-Victor/events{/privacy}","received_events_url":"https://api.github.com/users/PI-Victor/received_events","type":"User","site_admin":false},"repo":{"id":44103475,"name":"origin","full_name":"PI-Victor/origin","owner":{"login":"PI-Victor","id":6294120,"avatar_url":"https://avatars.githubusercontent.com/u/6294120?v=3","gravatar_id":"","url":"https://api.github.com/users/PI-Victor","html_url":"https://github.com/PI-Victor","followers_url":"https://api.github.com/users/PI-Victor/followers","following_url":"https://api.github.com/users/PI-Victor/following{/other_user}","gists_url":"https://api.github.com/users/PI-Victor/gists{/gist_id}","starred_url":"https://api.github.com/users/PI-Victor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PI-Victor/subscriptions","organizations_url":"https://api.github.com/users/PI-Victor/orgs","repos_url":"https://api.github.com/users/PI-Victor/repos","events_url":"https://api.github.com/users/PI-Victor/events{/privacy}","received_events_url":"https://api.github.com/users/PI-Victor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PI-Victor/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/PI-Victor/origin","forks_url":"https://api.github.com/repos/PI-Victor/origin/forks","keys_url":"https://api.github.com/repos/PI-Victor/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PI-Victor/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PI-Victor/origin/teams","hooks_url":"https://api.github.com/repos/PI-Victor/origin/hooks","issue_events_url":"https://api.github.com/repos/PI-Victor/origin/issues/events{/number}","events_url":"https://api.github.com/repos/PI-Victor/origin/events","assignees_url":"https://api.github.com/repos/PI-Victor/origin/assignees{/user}","branches_url":"https://api.github.com/repos/PI-Victor/origin/branches{/branch}","tags_url":"https://api.github.com/repos/PI-Victor/origin/tags","blobs_url":"https://api.github.com/repos/PI-Victor/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PI-Victor/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PI-Victor/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/PI-Victor/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PI-Victor/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/PI-Victor/origin/languages","stargazers_url":"https://api.github.com/repos/PI-Victor/origin/stargazers","contributors_url":"https://api.github.com/repos/PI-Victor/origin/contributors","subscribers_url":"https://api.github.com/repos/PI-Victor/origin/subscribers","subscription_url":"https://api.github.com/repos/PI-Victor/origin/subscription","commits_url":"https://api.github.com/repos/PI-Victor/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/PI-Victor/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/PI-Victor/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/PI-Victor/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/PI-Victor/origin/contents/{+path}","compare_url":"https://api.github.com/repos/PI-Victor/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PI-Victor/origin/merges","archive_url":"https://api.github.com/repos/PI-Victor/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PI-Victor/origin/downloads","issues_url":"https://api.github.com/repos/PI-Victor/origin/issues{/number}","pulls_url":"https://api.github.com/repos/PI-Victor/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/PI-Victor/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/PI-Victor/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PI-Victor/origin/labels{/name}","releases_url":"https://api.github.com/repos/PI-Victor/origin/releases{/id}","deployments_url":"https://api.github.com/repos/PI-Victor/origin/deployments","created_at":"2015-10-12T11:36:04Z","updated_at":"2016-01-13T09:40:44Z","pushed_at":"2016-04-05T10:25:43Z","git_url":"git://github.com/PI-Victor/origin.git","ssh_url":"git@github.com:PI-Victor/origin.git","clone_url":"https://github.com/PI-Victor/origin.git","svn_url":"https://github.com/PI-Victor/origin","homepage":"http://www.openshift.org","size":235660,"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":"ef1caba064de975387860175c3138aad432cf356","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":"The Continuous Application Platform - build, deploy, and manage cloud-native and legacy applications on Kubernetes and Docker","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}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2016-04-05T05:55:04Z","pushed_at":"2016-04-05T11:01:24Z","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":314912,"stargazers_count":1189,"watchers_count":1189,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":728,"mirror_url":null,"open_issues_count":949,"forks":728,"open_issues":949,"watchers":1189,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/7518"},"html":{"href":"https://github.com/openshift/origin/pull/7518"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/7518"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/7518/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/7518/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/7518/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/a8da66545a7f8f33b2b49ab1d1c21c26ccf5a443"}}}}