{"action":"created","comment":{"url":"https://api.github.com/repos/containers/image/pulls/comments/132814997","pull_request_review_id":55940939,"id":132814997,"diff_hunk":"@@ -224,3 +230,30 @@ func (d *ociImageDestination) Commit() error {\n \t}\n \treturn ioutil.WriteFile(d.ref.indexPath(), indexJSON, 0644)\n }\n+\n+func ensureDirectoryExists(path string) error {\n+\tif _, err := os.Stat(path); err != nil && os.IsNotExist(err) {","path":"oci/layout/oci_dest.go","position":63,"original_position":63,"commit_id":"e3b0b96906a613bddc35e0ee79df5eed02cfc141","original_commit_id":"e3b0b96906a613bddc35e0ee79df5eed02cfc141","user":{"login":"cyphar","id":2888411,"avatar_url":"https://avatars1.githubusercontent.com/u/2888411?v=4","gravatar_id":"","url":"https://api.github.com/users/cyphar","html_url":"https://github.com/cyphar","followers_url":"https://api.github.com/users/cyphar/followers","following_url":"https://api.github.com/users/cyphar/following{/other_user}","gists_url":"https://api.github.com/users/cyphar/gists{/gist_id}","starred_url":"https://api.github.com/users/cyphar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyphar/subscriptions","organizations_url":"https://api.github.com/users/cyphar/orgs","repos_url":"https://api.github.com/users/cyphar/repos","events_url":"https://api.github.com/users/cyphar/events{/privacy}","received_events_url":"https://api.github.com/users/cyphar/received_events","type":"User","site_admin":false},"body":"Shouldn't this be using the `exist` function you wrote?","created_at":"2017-08-12T10:07:17Z","updated_at":"2017-08-12T10:07:17Z","html_url":"https://github.com/containers/image/pull/326#discussion_r132814997","pull_request_url":"https://api.github.com/repos/containers/image/pulls/326","_links":{"self":{"href":"https://api.github.com/repos/containers/image/pulls/comments/132814997"},"html":{"href":"https://github.com/containers/image/pull/326#discussion_r132814997"},"pull_request":{"href":"https://api.github.com/repos/containers/image/pulls/326"}}},"pull_request":{"url":"https://api.github.com/repos/containers/image/pulls/326","id":135397455,"html_url":"https://github.com/containers/image/pull/326","diff_url":"https://github.com/containers/image/pull/326.diff","patch_url":"https://github.com/containers/image/pull/326.patch","issue_url":"https://api.github.com/repos/containers/image/issues/326","number":326,"state":"open","locked":false,"title":"[WIP] Issue #155 - Making sure existing OCI index gets not overwritten","user":{"login":"hferentschik","id":296354,"avatar_url":"https://avatars0.githubusercontent.com/u/296354?v=4","gravatar_id":"","url":"https://api.github.com/users/hferentschik","html_url":"https://github.com/hferentschik","followers_url":"https://api.github.com/users/hferentschik/followers","following_url":"https://api.github.com/users/hferentschik/following{/other_user}","gists_url":"https://api.github.com/users/hferentschik/gists{/gist_id}","starred_url":"https://api.github.com/users/hferentschik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hferentschik/subscriptions","organizations_url":"https://api.github.com/users/hferentschik/orgs","repos_url":"https://api.github.com/users/hferentschik/repos","events_url":"https://api.github.com/users/hferentschik/events{/privacy}","received_events_url":"https://api.github.com/users/hferentschik/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-11T18:54:50Z","updated_at":"2017-08-12T10:07:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c93410879e7523a2dc15a2b8f483655f75f8052","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/containers/image/pulls/326/commits","review_comments_url":"https://api.github.com/repos/containers/image/pulls/326/comments","review_comment_url":"https://api.github.com/repos/containers/image/pulls/comments{/number}","comments_url":"https://api.github.com/repos/containers/image/issues/326/comments","statuses_url":"https://api.github.com/repos/containers/image/statuses/e3b0b96906a613bddc35e0ee79df5eed02cfc141","head":{"label":"hferentschik:issue-155","ref":"issue-155","sha":"e3b0b96906a613bddc35e0ee79df5eed02cfc141","user":{"login":"hferentschik","id":296354,"avatar_url":"https://avatars0.githubusercontent.com/u/296354?v=4","gravatar_id":"","url":"https://api.github.com/users/hferentschik","html_url":"https://github.com/hferentschik","followers_url":"https://api.github.com/users/hferentschik/followers","following_url":"https://api.github.com/users/hferentschik/following{/other_user}","gists_url":"https://api.github.com/users/hferentschik/gists{/gist_id}","starred_url":"https://api.github.com/users/hferentschik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hferentschik/subscriptions","organizations_url":"https://api.github.com/users/hferentschik/orgs","repos_url":"https://api.github.com/users/hferentschik/repos","events_url":"https://api.github.com/users/hferentschik/events{/privacy}","received_events_url":"https://api.github.com/users/hferentschik/received_events","type":"User","site_admin":false},"repo":{"id":97840954,"name":"image","full_name":"hferentschik/image","owner":{"login":"hferentschik","id":296354,"avatar_url":"https://avatars0.githubusercontent.com/u/296354?v=4","gravatar_id":"","url":"https://api.github.com/users/hferentschik","html_url":"https://github.com/hferentschik","followers_url":"https://api.github.com/users/hferentschik/followers","following_url":"https://api.github.com/users/hferentschik/following{/other_user}","gists_url":"https://api.github.com/users/hferentschik/gists{/gist_id}","starred_url":"https://api.github.com/users/hferentschik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hferentschik/subscriptions","organizations_url":"https://api.github.com/users/hferentschik/orgs","repos_url":"https://api.github.com/users/hferentschik/repos","events_url":"https://api.github.com/users/hferentschik/events{/privacy}","received_events_url":"https://api.github.com/users/hferentschik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hferentschik/image","description":"Work with containers' images","fork":true,"url":"https://api.github.com/repos/hferentschik/image","forks_url":"https://api.github.com/repos/hferentschik/image/forks","keys_url":"https://api.github.com/repos/hferentschik/image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hferentschik/image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hferentschik/image/teams","hooks_url":"https://api.github.com/repos/hferentschik/image/hooks","issue_events_url":"https://api.github.com/repos/hferentschik/image/issues/events{/number}","events_url":"https://api.github.com/repos/hferentschik/image/events","assignees_url":"https://api.github.com/repos/hferentschik/image/assignees{/user}","branches_url":"https://api.github.com/repos/hferentschik/image/branches{/branch}","tags_url":"https://api.github.com/repos/hferentschik/image/tags","blobs_url":"https://api.github.com/repos/hferentschik/image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hferentschik/image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hferentschik/image/git/refs{/sha}","trees_url":"https://api.github.com/repos/hferentschik/image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hferentschik/image/statuses/{sha}","languages_url":"https://api.github.com/repos/hferentschik/image/languages","stargazers_url":"https://api.github.com/repos/hferentschik/image/stargazers","contributors_url":"https://api.github.com/repos/hferentschik/image/contributors","subscribers_url":"https://api.github.com/repos/hferentschik/image/subscribers","subscription_url":"https://api.github.com/repos/hferentschik/image/subscription","commits_url":"https://api.github.com/repos/hferentschik/image/commits{/sha}","git_commits_url":"https://api.github.com/repos/hferentschik/image/git/commits{/sha}","comments_url":"https://api.github.com/repos/hferentschik/image/comments{/number}","issue_comment_url":"https://api.github.com/repos/hferentschik/image/issues/comments{/number}","contents_url":"https://api.github.com/repos/hferentschik/image/contents/{+path}","compare_url":"https://api.github.com/repos/hferentschik/image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hferentschik/image/merges","archive_url":"https://api.github.com/repos/hferentschik/image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hferentschik/image/downloads","issues_url":"https://api.github.com/repos/hferentschik/image/issues{/number}","pulls_url":"https://api.github.com/repos/hferentschik/image/pulls{/number}","milestones_url":"https://api.github.com/repos/hferentschik/image/milestones{/number}","notifications_url":"https://api.github.com/repos/hferentschik/image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hferentschik/image/labels{/name}","releases_url":"https://api.github.com/repos/hferentschik/image/releases{/id}","deployments_url":"https://api.github.com/repos/hferentschik/image/deployments","created_at":"2017-07-20T13:51:43Z","updated_at":"2017-07-20T13:51:45Z","pushed_at":"2017-08-11T18:52:57Z","git_url":"git://github.com/hferentschik/image.git","ssh_url":"git@github.com:hferentschik/image.git","clone_url":"https://github.com/hferentschik/image.git","svn_url":"https://github.com/hferentschik/image","homepage":"","size":3376,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":0,"default_branch":"master"}},"base":{"label":"containers:master","ref":"master","sha":"74e359348c7ce9e0caf4fa75aa8de3809cf41c46","user":{"login":"containers","id":5874934,"avatar_url":"https://avatars3.githubusercontent.com/u/5874934?v=4","gravatar_id":"","url":"https://api.github.com/users/containers","html_url":"https://github.com/containers","followers_url":"https://api.github.com/users/containers/followers","following_url":"https://api.github.com/users/containers/following{/other_user}","gists_url":"https://api.github.com/users/containers/gists{/gist_id}","starred_url":"https://api.github.com/users/containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containers/subscriptions","organizations_url":"https://api.github.com/users/containers/orgs","repos_url":"https://api.github.com/users/containers/repos","events_url":"https://api.github.com/users/containers/events{/privacy}","received_events_url":"https://api.github.com/users/containers/received_events","type":"Organization","site_admin":false},"repo":{"id":61739430,"name":"image","full_name":"containers/image","owner":{"login":"containers","id":5874934,"avatar_url":"https://avatars3.githubusercontent.com/u/5874934?v=4","gravatar_id":"","url":"https://api.github.com/users/containers","html_url":"https://github.com/containers","followers_url":"https://api.github.com/users/containers/followers","following_url":"https://api.github.com/users/containers/following{/other_user}","gists_url":"https://api.github.com/users/containers/gists{/gist_id}","starred_url":"https://api.github.com/users/containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containers/subscriptions","organizations_url":"https://api.github.com/users/containers/orgs","repos_url":"https://api.github.com/users/containers/repos","events_url":"https://api.github.com/users/containers/events{/privacy}","received_events_url":"https://api.github.com/users/containers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/containers/image","description":"Work with containers' images","fork":false,"url":"https://api.github.com/repos/containers/image","forks_url":"https://api.github.com/repos/containers/image/forks","keys_url":"https://api.github.com/repos/containers/image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/containers/image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/containers/image/teams","hooks_url":"https://api.github.com/repos/containers/image/hooks","issue_events_url":"https://api.github.com/repos/containers/image/issues/events{/number}","events_url":"https://api.github.com/repos/containers/image/events","assignees_url":"https://api.github.com/repos/containers/image/assignees{/user}","branches_url":"https://api.github.com/repos/containers/image/branches{/branch}","tags_url":"https://api.github.com/repos/containers/image/tags","blobs_url":"https://api.github.com/repos/containers/image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/containers/image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/containers/image/git/refs{/sha}","trees_url":"https://api.github.com/repos/containers/image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/containers/image/statuses/{sha}","languages_url":"https://api.github.com/repos/containers/image/languages","stargazers_url":"https://api.github.com/repos/containers/image/stargazers","contributors_url":"https://api.github.com/repos/containers/image/contributors","subscribers_url":"https://api.github.com/repos/containers/image/subscribers","subscription_url":"https://api.github.com/repos/containers/image/subscription","commits_url":"https://api.github.com/repos/containers/image/commits{/sha}","git_commits_url":"https://api.github.com/repos/containers/image/git/commits{/sha}","comments_url":"https://api.github.com/repos/containers/image/comments{/number}","issue_comment_url":"https://api.github.com/repos/containers/image/issues/comments{/number}","contents_url":"https://api.github.com/repos/containers/image/contents/{+path}","compare_url":"https://api.github.com/repos/containers/image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/containers/image/merges","archive_url":"https://api.github.com/repos/containers/image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/containers/image/downloads","issues_url":"https://api.github.com/repos/containers/image/issues{/number}","pulls_url":"https://api.github.com/repos/containers/image/pulls{/number}","milestones_url":"https://api.github.com/repos/containers/image/milestones{/number}","notifications_url":"https://api.github.com/repos/containers/image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/containers/image/labels{/name}","releases_url":"https://api.github.com/repos/containers/image/releases{/id}","deployments_url":"https://api.github.com/repos/containers/image/deployments","created_at":"2016-06-22T17:46:41Z","updated_at":"2017-08-11T14:20:04Z","pushed_at":"2017-08-11T18:54:51Z","git_url":"git://github.com/containers/image.git","ssh_url":"git@github.com:containers/image.git","clone_url":"https://github.com/containers/image.git","svn_url":"https://github.com/containers/image","homepage":"","size":3368,"stargazers_count":84,"watchers_count":84,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":50,"forks":46,"open_issues":50,"watchers":84,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/containers/image/pulls/326"},"html":{"href":"https://github.com/containers/image/pull/326"},"issue":{"href":"https://api.github.com/repos/containers/image/issues/326"},"comments":{"href":"https://api.github.com/repos/containers/image/issues/326/comments"},"review_comments":{"href":"https://api.github.com/repos/containers/image/pulls/326/comments"},"review_comment":{"href":"https://api.github.com/repos/containers/image/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/containers/image/pulls/326/commits"},"statuses":{"href":"https://api.github.com/repos/containers/image/statuses/e3b0b96906a613bddc35e0ee79df5eed02cfc141"}}}}
{"actor":{"display_login":"cyphar"}}