{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/49174","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/49174/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/49174/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/49174/events","html_url":"https://github.com/kubernetes/kubernetes/pull/49174","id":243909184,"number":49174,"title":"add `kubectl apply diff-last-applied` subcommand","user":{"login":"shiywang","id":6284003,"avatar_url":"https://avatars3.githubusercontent.com/u/6284003?v=4","gravatar_id":"","url":"https://api.github.com/users/shiywang","html_url":"https://github.com/shiywang","followers_url":"https://api.github.com/users/shiywang/followers","following_url":"https://api.github.com/users/shiywang/following{/other_user}","gists_url":"https://api.github.com/users/shiywang/gists{/gist_id}","starred_url":"https://api.github.com/users/shiywang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiywang/subscriptions","organizations_url":"https://api.github.com/users/shiywang/orgs","repos_url":"https://api.github.com/users/shiywang/repos","events_url":"https://api.github.com/users/shiywang/events{/privacy}","received_events_url":"https://api.github.com/users/shiywang/received_events","type":"User","site_admin":false},"labels":[{"id":334598906,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/old-docs","name":"kind/old-docs","color":"c7def8","default":false},{"id":349530192,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-label-needed","name":"release-note-label-needed","color":"db5a64","default":false},{"id":450823910,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/cli","name":"sig/cli","color":"d2b48c","default":false},{"id":253451093,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XXL","name":"size/XXL","color":"ee0000","default":false}],"state":"open","locked":false,"assignee":{"login":"ericchiang","id":2342749,"avatar_url":"https://avatars1.githubusercontent.com/u/2342749?v=4","gravatar_id":"","url":"https://api.github.com/users/ericchiang","html_url":"https://github.com/ericchiang","followers_url":"https://api.github.com/users/ericchiang/followers","following_url":"https://api.github.com/users/ericchiang/following{/other_user}","gists_url":"https://api.github.com/users/ericchiang/gists{/gist_id}","starred_url":"https://api.github.com/users/ericchiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericchiang/subscriptions","organizations_url":"https://api.github.com/users/ericchiang/orgs","repos_url":"https://api.github.com/users/ericchiang/repos","events_url":"https://api.github.com/users/ericchiang/events{/privacy}","received_events_url":"https://api.github.com/users/ericchiang/received_events","type":"User","site_admin":false},"assignees":[{"login":"ericchiang","id":2342749,"avatar_url":"https://avatars1.githubusercontent.com/u/2342749?v=4","gravatar_id":"","url":"https://api.github.com/users/ericchiang","html_url":"https://github.com/ericchiang","followers_url":"https://api.github.com/users/ericchiang/followers","following_url":"https://api.github.com/users/ericchiang/following{/other_user}","gists_url":"https://api.github.com/users/ericchiang/gists{/gist_id}","starred_url":"https://api.github.com/users/ericchiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericchiang/subscriptions","organizations_url":"https://api.github.com/users/ericchiang/orgs","repos_url":"https://api.github.com/users/ericchiang/repos","events_url":"https://api.github.com/users/ericchiang/events{/privacy}","received_events_url":"https://api.github.com/users/ericchiang/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-07-19T03:00:23Z","updated_at":"2017-07-19T03:00:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/49174","html_url":"https://github.com/kubernetes/kubernetes/pull/49174","diff_url":"https://github.com/kubernetes/kubernetes/pull/49174.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/49174.patch"},"body":"https://github.com/kubernetes/community/pull/287\r\n`apply diff-last-applied` will invoke `git diff --no-index`, if there's no `git`, it will degenerate to use `diff` also you can use a customize diff tool by setting env : `KUBECTL_EXTERNAL_DIFF`\r\n```console\r\n[root@shiywang template]# ./kubectl apply diff-last-applied -f nginx.yaml \r\ndiff --git a/tmp/kubectl-diff-yd44r.yaml b/tmp/kubectl-diff-0wox0.yaml\r\nindex 46aa188..d44cab2 100644\r\n--- a/tmp/kubectl-diff-yd44r.yaml\r\n+++ b/tmp/kubectl-diff-0wox0.yaml\r\n@@ -8,7 +8,7 @@ spec:\r\n   template:\r\n     metadata:\r\n       labels:\r\n-        app: nginx123\r\n+        app: nginx\r\n     spec:\r\n       containers:\r\n       - image: gcr.io/google_containers/nginx-slim:0.8\r\n[root@shiywang template]# \r\n```\r\n\r\n@kubernetes/sig-cli-pr-reviews \r\n@mengqiy  @alexandercampbell "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/316258971","html_url":"https://github.com/kubernetes/kubernetes/pull/49174#issuecomment-316258971","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/49174","id":316258971,"user":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars0.githubusercontent.com/u/13653959?v=4","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"created_at":"2017-07-19T03:00:38Z","updated_at":"2017-07-19T03:00:38Z","body":"Labelling this PR as size/XXL"}}
{"actor":{"display_login":"k8s-merge-robot"}}