{"action":"created","issue":{"url":"https://api.github.com/repos/styled-components/styled-components/issues/2108","repository_url":"https://api.github.com/repos/styled-components/styled-components","labels_url":"https://api.github.com/repos/styled-components/styled-components/issues/2108/labels{/name}","comments_url":"https://api.github.com/repos/styled-components/styled-components/issues/2108/comments","events_url":"https://api.github.com/repos/styled-components/styled-components/issues/2108/events","html_url":"https://github.com/styled-components/styled-components/pull/2108","id":370798271,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzMzk1MDY1","number":2108,"title":"Failing test for ampersand selector","user":{"login":"quentez","id":504055,"node_id":"MDQ6VXNlcjUwNDA1NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/504055?v=4","gravatar_id":"","url":"https://api.github.com/users/quentez","html_url":"https://github.com/quentez","followers_url":"https://api.github.com/users/quentez/followers","following_url":"https://api.github.com/users/quentez/following{/other_user}","gists_url":"https://api.github.com/users/quentez/gists{/gist_id}","starred_url":"https://api.github.com/users/quentez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quentez/subscriptions","organizations_url":"https://api.github.com/users/quentez/orgs","repos_url":"https://api.github.com/users/quentez/repos","events_url":"https://api.github.com/users/quentez/events{/privacy}","received_events_url":"https://api.github.com/users/quentez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-16T21:02:07Z","updated_at":"2018-10-17T02:07:38Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/styled-components/styled-components/pulls/2108","html_url":"https://github.com/styled-components/styled-components/pull/2108","diff_url":"https://github.com/styled-components/styled-components/pull/2108.diff","patch_url":"https://github.com/styled-components/styled-components/pull/2108.patch"},"body":"Since beta 11 of Styled Components `4.0.0`, we've been experiencing a regression where some selectors that use the ampersand operator will not be properly converted.\r\n\r\nInput:\r\n\r\n```\r\n.foo > & {}\r\n```\r\n\r\nExpected output:\r\n\r\n```\r\n.foo > .x {}\r\n```\r\n\r\nActual output:\r\n\r\n```\r\n.x .foo > .x {}\r\n```\r\n\r\nThe culprit appears to be this regular expression: https://github.com/styled-components/styled-components/blob/12cde61a9bb6dbbd167cbb2b3244c1354b32d566/src/utils/stringifyRules.js#L7\r\n\r\nUnfortunately, I don't think I have enough context to fix this without breaking other things that depend on it."},"comment":{"url":"https://api.github.com/repos/styled-components/styled-components/issues/comments/430463704","html_url":"https://github.com/styled-components/styled-components/pull/2108#issuecomment-430463704","issue_url":"https://api.github.com/repos/styled-components/styled-components/issues/2108","id":430463704,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDQ2MzcwNA==","user":{"login":"probablyup","id":570070,"node_id":"MDQ6VXNlcjU3MDA3MA==","avatar_url":"https://avatars2.githubusercontent.com/u/570070?v=4","gravatar_id":"","url":"https://api.github.com/users/probablyup","html_url":"https://github.com/probablyup","followers_url":"https://api.github.com/users/probablyup/followers","following_url":"https://api.github.com/users/probablyup/following{/other_user}","gists_url":"https://api.github.com/users/probablyup/gists{/gist_id}","starred_url":"https://api.github.com/users/probablyup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/probablyup/subscriptions","organizations_url":"https://api.github.com/users/probablyup/orgs","repos_url":"https://api.github.com/users/probablyup/repos","events_url":"https://api.github.com/users/probablyup/events{/privacy}","received_events_url":"https://api.github.com/users/probablyup/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T02:07:38Z","updated_at":"2018-10-17T02:07:38Z","author_association":"CONTRIBUTOR","body":"Thank you! I'll work on fixing this tonight"}}
{"actor":{"display_login":"probablyup"}}