{"action":"opened","number":580,"pull_request":{"url":"https://api.github.com/repos/sanity-io/sanity/pulls/580","id":167416178,"html_url":"https://github.com/sanity-io/sanity/pull/580","diff_url":"https://github.com/sanity-io/sanity/pull/580.diff","patch_url":"https://github.com/sanity-io/sanity/pull/580.patch","issue_url":"https://api.github.com/repos/sanity-io/sanity/issues/580","number":580,"state":"open","locked":false,"title":"[preview] Don't write ref attributes on materialized values","user":{"login":"bjoerge","id":876086,"avatar_url":"https://avatars0.githubusercontent.com/u/876086?v=4","gravatar_id":"","url":"https://api.github.com/users/bjoerge","html_url":"https://github.com/bjoerge","followers_url":"https://api.github.com/users/bjoerge/followers","following_url":"https://api.github.com/users/bjoerge/following{/other_user}","gists_url":"https://api.github.com/users/bjoerge/gists{/gist_id}","starred_url":"https://api.github.com/users/bjoerge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjoerge/subscriptions","organizations_url":"https://api.github.com/users/bjoerge/orgs","repos_url":"https://api.github.com/users/bjoerge/repos","events_url":"https://api.github.com/users/bjoerge/events{/privacy}","received_events_url":"https://api.github.com/users/bjoerge/received_events","type":"User","site_admin":false},"body":"When the preview was called with a value that was materialized, it was extending it afterwards with the original passed value. This caused the `_ref`, (and sometimes `_key`) attributes to be added to the resulting value, and could potentially cause subsequent calls with the same value to identify it as a reference and (needlessly) materialize it again.\r\n\r\nThis patch omits writing the original attributes if the passed value was a reference.","created_at":"2018-02-06T13:39:22Z","updated_at":"2018-02-06T13:39:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/sanity-io/sanity/pulls/580/commits","review_comments_url":"https://api.github.com/repos/sanity-io/sanity/pulls/580/comments","review_comment_url":"https://api.github.com/repos/sanity-io/sanity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sanity-io/sanity/issues/580/comments","statuses_url":"https://api.github.com/repos/sanity-io/sanity/statuses/f6630369b859229f5399513971b564c5604729dc","head":{"label":"sanity-io:preview-dont-set-ref-on-materialized-value","ref":"preview-dont-set-ref-on-materialized-value","sha":"f6630369b859229f5399513971b564c5604729dc","user":{"login":"sanity-io","id":17177659,"avatar_url":"https://avatars2.githubusercontent.com/u/17177659?v=4","gravatar_id":"","url":"https://api.github.com/users/sanity-io","html_url":"https://github.com/sanity-io","followers_url":"https://api.github.com/users/sanity-io/followers","following_url":"https://api.github.com/users/sanity-io/following{/other_user}","gists_url":"https://api.github.com/users/sanity-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sanity-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanity-io/subscriptions","organizations_url":"https://api.github.com/users/sanity-io/orgs","repos_url":"https://api.github.com/users/sanity-io/repos","events_url":"https://api.github.com/users/sanity-io/events{/privacy}","received_events_url":"https://api.github.com/users/sanity-io/received_events","type":"Organization","site_admin":false},"repo":{"id":79375056,"name":"sanity","full_name":"sanity-io/sanity","owner":{"login":"sanity-io","id":17177659,"avatar_url":"https://avatars2.githubusercontent.com/u/17177659?v=4","gravatar_id":"","url":"https://api.github.com/users/sanity-io","html_url":"https://github.com/sanity-io","followers_url":"https://api.github.com/users/sanity-io/followers","following_url":"https://api.github.com/users/sanity-io/following{/other_user}","gists_url":"https://api.github.com/users/sanity-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sanity-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanity-io/subscriptions","organizations_url":"https://api.github.com/users/sanity-io/orgs","repos_url":"https://api.github.com/users/sanity-io/repos","events_url":"https://api.github.com/users/sanity-io/events{/privacy}","received_events_url":"https://api.github.com/users/sanity-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sanity-io/sanity","description":"Sanity Content Studio – Collaborate in real-time on structured data","fork":false,"url":"https://api.github.com/repos/sanity-io/sanity","forks_url":"https://api.github.com/repos/sanity-io/sanity/forks","keys_url":"https://api.github.com/repos/sanity-io/sanity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanity-io/sanity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanity-io/sanity/teams","hooks_url":"https://api.github.com/repos/sanity-io/sanity/hooks","issue_events_url":"https://api.github.com/repos/sanity-io/sanity/issues/events{/number}","events_url":"https://api.github.com/repos/sanity-io/sanity/events","assignees_url":"https://api.github.com/repos/sanity-io/sanity/assignees{/user}","branches_url":"https://api.github.com/repos/sanity-io/sanity/branches{/branch}","tags_url":"https://api.github.com/repos/sanity-io/sanity/tags","blobs_url":"https://api.github.com/repos/sanity-io/sanity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanity-io/sanity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanity-io/sanity/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanity-io/sanity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanity-io/sanity/statuses/{sha}","languages_url":"https://api.github.com/repos/sanity-io/sanity/languages","stargazers_url":"https://api.github.com/repos/sanity-io/sanity/stargazers","contributors_url":"https://api.github.com/repos/sanity-io/sanity/contributors","subscribers_url":"https://api.github.com/repos/sanity-io/sanity/subscribers","subscription_url":"https://api.github.com/repos/sanity-io/sanity/subscription","commits_url":"https://api.github.com/repos/sanity-io/sanity/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanity-io/sanity/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanity-io/sanity/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanity-io/sanity/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanity-io/sanity/contents/{+path}","compare_url":"https://api.github.com/repos/sanity-io/sanity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanity-io/sanity/merges","archive_url":"https://api.github.com/repos/sanity-io/sanity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanity-io/sanity/downloads","issues_url":"https://api.github.com/repos/sanity-io/sanity/issues{/number}","pulls_url":"https://api.github.com/repos/sanity-io/sanity/pulls{/number}","milestones_url":"https://api.github.com/repos/sanity-io/sanity/milestones{/number}","notifications_url":"https://api.github.com/repos/sanity-io/sanity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanity-io/sanity/labels{/name}","releases_url":"https://api.github.com/repos/sanity-io/sanity/releases{/id}","deployments_url":"https://api.github.com/repos/sanity-io/sanity/deployments","created_at":"2017-01-18T19:19:02Z","updated_at":"2018-02-06T04:44:53Z","pushed_at":"2018-02-06T13:31:14Z","git_url":"git://github.com/sanity-io/sanity.git","ssh_url":"git@github.com:sanity-io/sanity.git","clone_url":"https://github.com/sanity-io/sanity.git","svn_url":"https://github.com/sanity-io/sanity","homepage":"https://sanity.io","size":22432,"stargazers_count":301,"watchers_count":301,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":13,"open_issues":63,"watchers":301,"default_branch":"next"}},"base":{"label":"sanity-io:next","ref":"next","sha":"f1701b5d53f5b444818f596fd0a5f43904eedeec","user":{"login":"sanity-io","id":17177659,"avatar_url":"https://avatars2.githubusercontent.com/u/17177659?v=4","gravatar_id":"","url":"https://api.github.com/users/sanity-io","html_url":"https://github.com/sanity-io","followers_url":"https://api.github.com/users/sanity-io/followers","following_url":"https://api.github.com/users/sanity-io/following{/other_user}","gists_url":"https://api.github.com/users/sanity-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sanity-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanity-io/subscriptions","organizations_url":"https://api.github.com/users/sanity-io/orgs","repos_url":"https://api.github.com/users/sanity-io/repos","events_url":"https://api.github.com/users/sanity-io/events{/privacy}","received_events_url":"https://api.github.com/users/sanity-io/received_events","type":"Organization","site_admin":false},"repo":{"id":79375056,"name":"sanity","full_name":"sanity-io/sanity","owner":{"login":"sanity-io","id":17177659,"avatar_url":"https://avatars2.githubusercontent.com/u/17177659?v=4","gravatar_id":"","url":"https://api.github.com/users/sanity-io","html_url":"https://github.com/sanity-io","followers_url":"https://api.github.com/users/sanity-io/followers","following_url":"https://api.github.com/users/sanity-io/following{/other_user}","gists_url":"https://api.github.com/users/sanity-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sanity-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanity-io/subscriptions","organizations_url":"https://api.github.com/users/sanity-io/orgs","repos_url":"https://api.github.com/users/sanity-io/repos","events_url":"https://api.github.com/users/sanity-io/events{/privacy}","received_events_url":"https://api.github.com/users/sanity-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sanity-io/sanity","description":"Sanity Content Studio – Collaborate in real-time on structured data","fork":false,"url":"https://api.github.com/repos/sanity-io/sanity","forks_url":"https://api.github.com/repos/sanity-io/sanity/forks","keys_url":"https://api.github.com/repos/sanity-io/sanity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanity-io/sanity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanity-io/sanity/teams","hooks_url":"https://api.github.com/repos/sanity-io/sanity/hooks","issue_events_url":"https://api.github.com/repos/sanity-io/sanity/issues/events{/number}","events_url":"https://api.github.com/repos/sanity-io/sanity/events","assignees_url":"https://api.github.com/repos/sanity-io/sanity/assignees{/user}","branches_url":"https://api.github.com/repos/sanity-io/sanity/branches{/branch}","tags_url":"https://api.github.com/repos/sanity-io/sanity/tags","blobs_url":"https://api.github.com/repos/sanity-io/sanity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanity-io/sanity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanity-io/sanity/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanity-io/sanity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanity-io/sanity/statuses/{sha}","languages_url":"https://api.github.com/repos/sanity-io/sanity/languages","stargazers_url":"https://api.github.com/repos/sanity-io/sanity/stargazers","contributors_url":"https://api.github.com/repos/sanity-io/sanity/contributors","subscribers_url":"https://api.github.com/repos/sanity-io/sanity/subscribers","subscription_url":"https://api.github.com/repos/sanity-io/sanity/subscription","commits_url":"https://api.github.com/repos/sanity-io/sanity/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanity-io/sanity/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanity-io/sanity/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanity-io/sanity/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanity-io/sanity/contents/{+path}","compare_url":"https://api.github.com/repos/sanity-io/sanity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanity-io/sanity/merges","archive_url":"https://api.github.com/repos/sanity-io/sanity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanity-io/sanity/downloads","issues_url":"https://api.github.com/repos/sanity-io/sanity/issues{/number}","pulls_url":"https://api.github.com/repos/sanity-io/sanity/pulls{/number}","milestones_url":"https://api.github.com/repos/sanity-io/sanity/milestones{/number}","notifications_url":"https://api.github.com/repos/sanity-io/sanity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanity-io/sanity/labels{/name}","releases_url":"https://api.github.com/repos/sanity-io/sanity/releases{/id}","deployments_url":"https://api.github.com/repos/sanity-io/sanity/deployments","created_at":"2017-01-18T19:19:02Z","updated_at":"2018-02-06T04:44:53Z","pushed_at":"2018-02-06T13:31:14Z","git_url":"git://github.com/sanity-io/sanity.git","ssh_url":"git@github.com:sanity-io/sanity.git","clone_url":"https://github.com/sanity-io/sanity.git","svn_url":"https://github.com/sanity-io/sanity","homepage":"https://sanity.io","size":22432,"stargazers_count":301,"watchers_count":301,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":13,"open_issues":63,"watchers":301,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/sanity-io/sanity/pulls/580"},"html":{"href":"https://github.com/sanity-io/sanity/pull/580"},"issue":{"href":"https://api.github.com/repos/sanity-io/sanity/issues/580"},"comments":{"href":"https://api.github.com/repos/sanity-io/sanity/issues/580/comments"},"review_comments":{"href":"https://api.github.com/repos/sanity-io/sanity/pulls/580/comments"},"review_comment":{"href":"https://api.github.com/repos/sanity-io/sanity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sanity-io/sanity/pulls/580/commits"},"statuses":{"href":"https://api.github.com/repos/sanity-io/sanity/statuses/f6630369b859229f5399513971b564c5604729dc"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":9,"deletions":5,"changed_files":1}}
{"actor":{"display_login":"bjoerge"}}