{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-tools/issues/923","repository_url":"https://api.github.com/repos/firebase/firebase-tools","labels_url":"https://api.github.com/repos/firebase/firebase-tools/issues/923/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-tools/issues/923/comments","events_url":"https://api.github.com/repos/firebase/firebase-tools/issues/923/events","html_url":"https://github.com/firebase/firebase-tools/pull/923","id":364588382,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NzM4MjQx","number":923,"title":"Simplify initialization of specific project","user":{"login":"samtstern","id":8466666,"node_id":"MDQ6VXNlcjg0NjY2NjY=","avatar_url":"https://avatars2.githubusercontent.com/u/8466666?v=4","gravatar_id":"","url":"https://api.github.com/users/samtstern","html_url":"https://github.com/samtstern","followers_url":"https://api.github.com/users/samtstern/followers","following_url":"https://api.github.com/users/samtstern/following{/other_user}","gists_url":"https://api.github.com/users/samtstern/gists{/gist_id}","starred_url":"https://api.github.com/users/samtstern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samtstern/subscriptions","organizations_url":"https://api.github.com/users/samtstern/orgs","repos_url":"https://api.github.com/users/samtstern/repos","events_url":"https://api.github.com/users/samtstern/events{/privacy}","received_events_url":"https://api.github.com/users/samtstern/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-09-27T17:55:39Z","updated_at":"2018-10-10T16:40:25Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/firebase/firebase-tools/pulls/923","html_url":"https://github.com/firebase/firebase-tools/pull/923","diff_url":"https://github.com/firebase/firebase-tools/pull/923.diff","patch_url":"https://github.com/firebase/firebase-tools/pull/923.patch"},"body":"Fixes #847\r\n\r\nTwo changes to `firebase init`:\r\n  * Allow passing `--project` to skip the prompt\r\n  * When the prompt is shown, alphabetize by project ID\r\n\r\n**Example 1: Valid Project ID**\r\n```\r\n$ ~/Projects/firebase/firebase-tools/bin/firebase --project=\"ossbot-test\" init firestore\r\n\r\nYou're about to initialize a Firebase project in this directory:\r\n\r\n  /usr/local/google/home/samstern/Projects/firebase/firebase-tools\r\n\r\n\r\n=== Project Setup\r\n\r\nFirst, let's associate this project directory with a Firebase project.\r\nYou can create multiple project aliases by running firebase use --add,\r\nbut for now we'll just set up a default project.\r\n\r\nUsing project OSSBot-test (ossbot-test)\r\n\r\n=== Firestore Setup\r\n\r\nFirestore Security Rules allow you to define how and when to allow\r\nrequests. You can keep these rules in your project directory\r\nand publish them with firebase deploy.\r\n\r\n? What file should be used for Firestore Rules? (firestore.rules)\r\n```\r\n\r\n**Example 2: Invalid Project ID**\r\n```\r\n$ ~/Projects/firebase/firebase-tools/bin/firebase --project=\"ossbot-testz\" init firestore\r\n\r\nYou're about to initialize a Firebase project in this directory:\r\n\r\n  /usr/local/google/home/samstern/Projects/firebase/firebase-tools\r\n\r\n\r\n=== Project Setup\r\n\r\nFirst, let's associate this project directory with a Firebase project.\r\nYou can create multiple project aliases by running firebase use --add,\r\nbut for now we'll just set up a default project.\r\n\r\nNo such project: ossbot-testz\r\n\r\n=== Firestore Setup\r\n\r\nError: No project active. Run with --project <projectId> or define an alias by\r\nrunning firebase use --add\r\n```"},"comment":{"url":"https://api.github.com/repos/firebase/firebase-tools/issues/comments/428643784","html_url":"https://github.com/firebase/firebase-tools/pull/923#issuecomment-428643784","issue_url":"https://api.github.com/repos/firebase/firebase-tools/issues/923","id":428643784,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODY0Mzc4NA==","user":{"login":"mbleigh","id":1022,"node_id":"MDQ6VXNlcjEwMjI=","avatar_url":"https://avatars0.githubusercontent.com/u/1022?v=4","gravatar_id":"","url":"https://api.github.com/users/mbleigh","html_url":"https://github.com/mbleigh","followers_url":"https://api.github.com/users/mbleigh/followers","following_url":"https://api.github.com/users/mbleigh/following{/other_user}","gists_url":"https://api.github.com/users/mbleigh/gists{/gist_id}","starred_url":"https://api.github.com/users/mbleigh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbleigh/subscriptions","organizations_url":"https://api.github.com/users/mbleigh/orgs","repos_url":"https://api.github.com/users/mbleigh/repos","events_url":"https://api.github.com/users/mbleigh/events{/privacy}","received_events_url":"https://api.github.com/users/mbleigh/received_events","type":"User","site_admin":false},"created_at":"2018-10-10T16:40:25Z","updated_at":"2018-10-10T16:40:25Z","author_association":"CONTRIBUTOR","body":"(b) was my suggestion. My intuition is if you have more than 25 GCP projects you know the project ID. But, on further reflection, it's probably fine to just alphabetize the big list and tell people they can use `--project`."}}
{"actor":{"display_login":"mbleigh"}}