{"action":"opened","number":484,"pull_request":{"url":"https://api.github.com/repos/callstack/linaria/pulls/484","id":316024487,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE2MDI0NDg3","html_url":"https://github.com/callstack/linaria/pull/484","diff_url":"https://github.com/callstack/linaria/pull/484.diff","patch_url":"https://github.com/callstack/linaria/pull/484.patch","issue_url":"https://api.github.com/repos/callstack/linaria/issues/484","number":484,"state":"open","locked":false,"title":"Add classNameSlug option","user":{"login":"chrisabrams","id":527740,"node_id":"MDQ6VXNlcjUyNzc0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/527740?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisabrams","html_url":"https://github.com/chrisabrams","followers_url":"https://api.github.com/users/chrisabrams/followers","following_url":"https://api.github.com/users/chrisabrams/following{/other_user}","gists_url":"https://api.github.com/users/chrisabrams/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisabrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisabrams/subscriptions","organizations_url":"https://api.github.com/users/chrisabrams/orgs","repos_url":"https://api.github.com/users/chrisabrams/repos","events_url":"https://api.github.com/users/chrisabrams/events{/privacy}","received_events_url":"https://api.github.com/users/chrisabrams/received_events","type":"User","site_admin":false},"body":"**Summary**\r\n\r\nAt GoDaddy we need the ability to generate a set of .css files which have consistent class names. Having the hash in/as the class name will not work for us as we have teams that only use our CSS (they don't have any React components).\r\n\r\nThis PR would enable GoDaddy to use Linaria as it provides the ability to generate a CSS class name which is consistent to the `displayName`. In using this new option, the end user takes responsibility for any class name collisions.\r\n\r\n## How to configure\r\n\r\n```\r\nmodule.exports = {\r\n  displayName: true,\r\n  classNameSlug: '[title]',\r\n};\r\n\r\n```\r\n\r\n## Example\r\n\r\nA file called `header.jsx`:\r\n\r\n```\r\nimport colors from './colors'\r\nimport { css } from 'linaria';\r\nimport { modularScale, hiDPI } from 'polished';\r\nimport fonts from './fonts';\r\n\r\n// Write your styles in `css` tag\r\nconst header = css`\r\n  color: ${colors.heading};\r\n  text-transform: uppercase;\r\n  font-family: ${fonts.heading};\r\n  font-size: ${modularScale(2)};\r\n\r\n  ${hiDPI(1.5)} {\r\n    font-size: ${modularScale(2.5)};\r\n  }\r\n`;\r\n\r\nexport default header\r\n```\r\n\r\n### Current generated class name\r\n\r\n    .header_h1h1jlnn\r\n\r\n### Proposed generated class name with the above configuration\r\n\r\n    .header\r\n\r\n**Test plan**\r\n\r\nI ran `yarn flow`, `yarn typescript`, `yarn lint`, and `yarn test`. The docs say there is a `test:integration` option but I did not see that in the `package.json`.\r\n","created_at":"2019-09-10T14:29:28Z","updated_at":"2019-09-10T14:29:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/callstack/linaria/pulls/484/commits","review_comments_url":"https://api.github.com/repos/callstack/linaria/pulls/484/comments","review_comment_url":"https://api.github.com/repos/callstack/linaria/pulls/comments{/number}","comments_url":"https://api.github.com/repos/callstack/linaria/issues/484/comments","statuses_url":"https://api.github.com/repos/callstack/linaria/statuses/2498f82663be19318fa1c8e12b92ce287cdc9b08","head":{"label":"chrisabrams:classNameSlug","ref":"classNameSlug","sha":"2498f82663be19318fa1c8e12b92ce287cdc9b08","user":{"login":"chrisabrams","id":527740,"node_id":"MDQ6VXNlcjUyNzc0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/527740?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisabrams","html_url":"https://github.com/chrisabrams","followers_url":"https://api.github.com/users/chrisabrams/followers","following_url":"https://api.github.com/users/chrisabrams/following{/other_user}","gists_url":"https://api.github.com/users/chrisabrams/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisabrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisabrams/subscriptions","organizations_url":"https://api.github.com/users/chrisabrams/orgs","repos_url":"https://api.github.com/users/chrisabrams/repos","events_url":"https://api.github.com/users/chrisabrams/events{/privacy}","received_events_url":"https://api.github.com/users/chrisabrams/received_events","type":"User","site_admin":false},"repo":{"id":206812695,"node_id":"MDEwOlJlcG9zaXRvcnkyMDY4MTI2OTU=","name":"linaria","full_name":"chrisabrams/linaria","private":false,"owner":{"login":"chrisabrams","id":527740,"node_id":"MDQ6VXNlcjUyNzc0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/527740?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisabrams","html_url":"https://github.com/chrisabrams","followers_url":"https://api.github.com/users/chrisabrams/followers","following_url":"https://api.github.com/users/chrisabrams/following{/other_user}","gists_url":"https://api.github.com/users/chrisabrams/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisabrams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisabrams/subscriptions","organizations_url":"https://api.github.com/users/chrisabrams/orgs","repos_url":"https://api.github.com/users/chrisabrams/repos","events_url":"https://api.github.com/users/chrisabrams/events{/privacy}","received_events_url":"https://api.github.com/users/chrisabrams/received_events","type":"User","site_admin":false},"html_url":"https://github.com/chrisabrams/linaria","description":"Zero-runtime CSS in JS library","fork":true,"url":"https://api.github.com/repos/chrisabrams/linaria","forks_url":"https://api.github.com/repos/chrisabrams/linaria/forks","keys_url":"https://api.github.com/repos/chrisabrams/linaria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chrisabrams/linaria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chrisabrams/linaria/teams","hooks_url":"https://api.github.com/repos/chrisabrams/linaria/hooks","issue_events_url":"https://api.github.com/repos/chrisabrams/linaria/issues/events{/number}","events_url":"https://api.github.com/repos/chrisabrams/linaria/events","assignees_url":"https://api.github.com/repos/chrisabrams/linaria/assignees{/user}","branches_url":"https://api.github.com/repos/chrisabrams/linaria/branches{/branch}","tags_url":"https://api.github.com/repos/chrisabrams/linaria/tags","blobs_url":"https://api.github.com/repos/chrisabrams/linaria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chrisabrams/linaria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chrisabrams/linaria/git/refs{/sha}","trees_url":"https://api.github.com/repos/chrisabrams/linaria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chrisabrams/linaria/statuses/{sha}","languages_url":"https://api.github.com/repos/chrisabrams/linaria/languages","stargazers_url":"https://api.github.com/repos/chrisabrams/linaria/stargazers","contributors_url":"https://api.github.com/repos/chrisabrams/linaria/contributors","subscribers_url":"https://api.github.com/repos/chrisabrams/linaria/subscribers","subscription_url":"https://api.github.com/repos/chrisabrams/linaria/subscription","commits_url":"https://api.github.com/repos/chrisabrams/linaria/commits{/sha}","git_commits_url":"https://api.github.com/repos/chrisabrams/linaria/git/commits{/sha}","comments_url":"https://api.github.com/repos/chrisabrams/linaria/comments{/number}","issue_comment_url":"https://api.github.com/repos/chrisabrams/linaria/issues/comments{/number}","contents_url":"https://api.github.com/repos/chrisabrams/linaria/contents/{+path}","compare_url":"https://api.github.com/repos/chrisabrams/linaria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chrisabrams/linaria/merges","archive_url":"https://api.github.com/repos/chrisabrams/linaria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chrisabrams/linaria/downloads","issues_url":"https://api.github.com/repos/chrisabrams/linaria/issues{/number}","pulls_url":"https://api.github.com/repos/chrisabrams/linaria/pulls{/number}","milestones_url":"https://api.github.com/repos/chrisabrams/linaria/milestones{/number}","notifications_url":"https://api.github.com/repos/chrisabrams/linaria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chrisabrams/linaria/labels{/name}","releases_url":"https://api.github.com/repos/chrisabrams/linaria/releases{/id}","deployments_url":"https://api.github.com/repos/chrisabrams/linaria/deployments","created_at":"2019-09-06T14:35:23Z","updated_at":"2019-09-06T14:35:24Z","pushed_at":"2019-09-10T14:27:51Z","git_url":"git://github.com/chrisabrams/linaria.git","ssh_url":"git@github.com:chrisabrams/linaria.git","clone_url":"https://github.com/chrisabrams/linaria.git","svn_url":"https://github.com/chrisabrams/linaria","homepage":"https://linaria.now.sh","size":4545,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"callstack:master","ref":"master","sha":"5400bb0297529b62f03e6e28c6ea25b932eca3a1","user":{"login":"callstack","id":42239399,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM5Mzk5","avatar_url":"https://avatars1.githubusercontent.com/u/42239399?v=4","gravatar_id":"","url":"https://api.github.com/users/callstack","html_url":"https://github.com/callstack","followers_url":"https://api.github.com/users/callstack/followers","following_url":"https://api.github.com/users/callstack/following{/other_user}","gists_url":"https://api.github.com/users/callstack/gists{/gist_id}","starred_url":"https://api.github.com/users/callstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callstack/subscriptions","organizations_url":"https://api.github.com/users/callstack/orgs","repos_url":"https://api.github.com/users/callstack/repos","events_url":"https://api.github.com/users/callstack/events{/privacy}","received_events_url":"https://api.github.com/users/callstack/received_events","type":"Organization","site_admin":false},"repo":{"id":92112844,"node_id":"MDEwOlJlcG9zaXRvcnk5MjExMjg0NA==","name":"linaria","full_name":"callstack/linaria","private":false,"owner":{"login":"callstack","id":42239399,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM5Mzk5","avatar_url":"https://avatars1.githubusercontent.com/u/42239399?v=4","gravatar_id":"","url":"https://api.github.com/users/callstack","html_url":"https://github.com/callstack","followers_url":"https://api.github.com/users/callstack/followers","following_url":"https://api.github.com/users/callstack/following{/other_user}","gists_url":"https://api.github.com/users/callstack/gists{/gist_id}","starred_url":"https://api.github.com/users/callstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callstack/subscriptions","organizations_url":"https://api.github.com/users/callstack/orgs","repos_url":"https://api.github.com/users/callstack/repos","events_url":"https://api.github.com/users/callstack/events{/privacy}","received_events_url":"https://api.github.com/users/callstack/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/callstack/linaria","description":"Zero-runtime CSS in JS library","fork":false,"url":"https://api.github.com/repos/callstack/linaria","forks_url":"https://api.github.com/repos/callstack/linaria/forks","keys_url":"https://api.github.com/repos/callstack/linaria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/callstack/linaria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/callstack/linaria/teams","hooks_url":"https://api.github.com/repos/callstack/linaria/hooks","issue_events_url":"https://api.github.com/repos/callstack/linaria/issues/events{/number}","events_url":"https://api.github.com/repos/callstack/linaria/events","assignees_url":"https://api.github.com/repos/callstack/linaria/assignees{/user}","branches_url":"https://api.github.com/repos/callstack/linaria/branches{/branch}","tags_url":"https://api.github.com/repos/callstack/linaria/tags","blobs_url":"https://api.github.com/repos/callstack/linaria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/callstack/linaria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/callstack/linaria/git/refs{/sha}","trees_url":"https://api.github.com/repos/callstack/linaria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/callstack/linaria/statuses/{sha}","languages_url":"https://api.github.com/repos/callstack/linaria/languages","stargazers_url":"https://api.github.com/repos/callstack/linaria/stargazers","contributors_url":"https://api.github.com/repos/callstack/linaria/contributors","subscribers_url":"https://api.github.com/repos/callstack/linaria/subscribers","subscription_url":"https://api.github.com/repos/callstack/linaria/subscription","commits_url":"https://api.github.com/repos/callstack/linaria/commits{/sha}","git_commits_url":"https://api.github.com/repos/callstack/linaria/git/commits{/sha}","comments_url":"https://api.github.com/repos/callstack/linaria/comments{/number}","issue_comment_url":"https://api.github.com/repos/callstack/linaria/issues/comments{/number}","contents_url":"https://api.github.com/repos/callstack/linaria/contents/{+path}","compare_url":"https://api.github.com/repos/callstack/linaria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/callstack/linaria/merges","archive_url":"https://api.github.com/repos/callstack/linaria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/callstack/linaria/downloads","issues_url":"https://api.github.com/repos/callstack/linaria/issues{/number}","pulls_url":"https://api.github.com/repos/callstack/linaria/pulls{/number}","milestones_url":"https://api.github.com/repos/callstack/linaria/milestones{/number}","notifications_url":"https://api.github.com/repos/callstack/linaria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/callstack/linaria/labels{/name}","releases_url":"https://api.github.com/repos/callstack/linaria/releases{/id}","deployments_url":"https://api.github.com/repos/callstack/linaria/deployments","created_at":"2017-05-23T00:52:34Z","updated_at":"2019-09-10T10:14:45Z","pushed_at":"2019-09-10T14:23:02Z","git_url":"git://github.com/callstack/linaria.git","ssh_url":"git@github.com:callstack/linaria.git","clone_url":"https://github.com/callstack/linaria.git","svn_url":"https://github.com/callstack/linaria","homepage":"https://linaria.now.sh","size":4544,"stargazers_count":4267,"watchers_count":4267,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":151,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":86,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":151,"open_issues":86,"watchers":4267,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/callstack/linaria/pulls/484"},"html":{"href":"https://github.com/callstack/linaria/pull/484"},"issue":{"href":"https://api.github.com/repos/callstack/linaria/issues/484"},"comments":{"href":"https://api.github.com/repos/callstack/linaria/issues/484/comments"},"review_comments":{"href":"https://api.github.com/repos/callstack/linaria/pulls/484/comments"},"review_comment":{"href":"https://api.github.com/repos/callstack/linaria/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/callstack/linaria/pulls/484/commits"},"statuses":{"href":"https://api.github.com/repos/callstack/linaria/statuses/2498f82663be19318fa1c8e12b92ce287cdc9b08"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":50,"deletions":1,"changed_files":4}}
{"actor":{"display_login":"chrisabrams"}}