{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/239692048","pull_request_review_id":182546633,"id":239692048,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTY5MjA0OA==","diff_hunk":"@@ -220,10 +220,10 @@ def initializer(filename, data = nil)\n       #\n       #   generate(:authenticated, \"user session\")\n       def generate(what, *args)\n-        log :generate, what","path":"railties/lib/rails/generators/actions.rb","position":null,"original_position":4,"commit_id":"f03f935ae5cbf78c51bc6bd678cfea29c4809fb1","original_commit_id":"f3ea7ff6417a4f0f7c6d7e0d8a5d139d51d39fcc","user":{"login":"deivid-rodriguez","id":2887858,"node_id":"MDQ6VXNlcjI4ODc4NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/2887858?v=4","gravatar_id":"","url":"https://api.github.com/users/deivid-rodriguez","html_url":"https://github.com/deivid-rodriguez","followers_url":"https://api.github.com/users/deivid-rodriguez/followers","following_url":"https://api.github.com/users/deivid-rodriguez/following{/other_user}","gists_url":"https://api.github.com/users/deivid-rodriguez/gists{/gist_id}","starred_url":"https://api.github.com/users/deivid-rodriguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deivid-rodriguez/subscriptions","organizations_url":"https://api.github.com/users/deivid-rodriguez/orgs","repos_url":"https://api.github.com/users/deivid-rodriguez/repos","events_url":"https://api.github.com/users/deivid-rodriguez/events{/privacy}","received_events_url":"https://api.github.com/users/deivid-rodriguez/received_events","type":"User","site_admin":false},"body":"@y-yagi I restored the previous logging :+1: ","created_at":"2018-12-07T04:19:58Z","updated_at":"2018-12-07T04:19:58Z","html_url":"https://github.com/rails/rails/pull/34420#discussion_r239692048","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/34420","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/239692048"},"html":{"href":"https://github.com/rails/rails/pull/34420#discussion_r239692048"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/34420"}},"in_reply_to_id":239684995},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/34420","id":229889287,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5ODg5Mjg3","html_url":"https://github.com/rails/rails/pull/34420","diff_url":"https://github.com/rails/rails/pull/34420.diff","patch_url":"https://github.com/rails/rails/pull/34420.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/34420","number":34420,"state":"open","locked":false,"title":"Abort early if generator command fails","user":{"login":"deivid-rodriguez","id":2887858,"node_id":"MDQ6VXNlcjI4ODc4NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/2887858?v=4","gravatar_id":"","url":"https://api.github.com/users/deivid-rodriguez","html_url":"https://github.com/deivid-rodriguez","followers_url":"https://api.github.com/users/deivid-rodriguez/followers","following_url":"https://api.github.com/users/deivid-rodriguez/following{/other_user}","gists_url":"https://api.github.com/users/deivid-rodriguez/gists{/gist_id}","starred_url":"https://api.github.com/users/deivid-rodriguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deivid-rodriguez/subscriptions","organizations_url":"https://api.github.com/users/deivid-rodriguez/orgs","repos_url":"https://api.github.com/users/deivid-rodriguez/repos","events_url":"https://api.github.com/users/deivid-rodriguez/events{/privacy}","received_events_url":"https://api.github.com/users/deivid-rodriguez/received_events","type":"User","site_admin":false},"body":"### Summary\r\n\r\nThis PR happens to overlap with #34418, but I think it tries to fix a slightly different problem. My issue is that sometimes rails generator commands that I run in CI fail, and I don't notice because the generator does not abort. So I added [a feature](https://github.com/erikhuda/thor/pull/628) in `thor` to force aborting the process if this happens, which I'm using in this PR. I think this could maybe become the default, but for now I introduced it as an opt-in because there's situations where you don't want it (for example, if you do `rails db:drop` inside a generator, you probably want to ignore the case where the db does not exist).\r\n\r\nIn my case, I run into this problem when using the `generate` action, so I refactored it to reuse the `rails_command` action, so I only need to add the new `abort_on_failure` option in a single place. \r\n\r\nThis probably needs a change log entry and some docs but I wanted to gathers some opinions first!\r\n","created_at":"2018-11-10T13:20:30Z","updated_at":"2018-12-07T04:19:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1978072a241bf2d1aded5658d9fa61aa323e99fc","assignee":{"login":"eileencodes","id":1080678,"node_id":"MDQ6VXNlcjEwODA2Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1080678?v=4","gravatar_id":"","url":"https://api.github.com/users/eileencodes","html_url":"https://github.com/eileencodes","followers_url":"https://api.github.com/users/eileencodes/followers","following_url":"https://api.github.com/users/eileencodes/following{/other_user}","gists_url":"https://api.github.com/users/eileencodes/gists{/gist_id}","starred_url":"https://api.github.com/users/eileencodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileencodes/subscriptions","organizations_url":"https://api.github.com/users/eileencodes/orgs","repos_url":"https://api.github.com/users/eileencodes/repos","events_url":"https://api.github.com/users/eileencodes/events{/privacy}","received_events_url":"https://api.github.com/users/eileencodes/received_events","type":"User","site_admin":true},"assignees":[{"login":"eileencodes","id":1080678,"node_id":"MDQ6VXNlcjEwODA2Nzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1080678?v=4","gravatar_id":"","url":"https://api.github.com/users/eileencodes","html_url":"https://github.com/eileencodes","followers_url":"https://api.github.com/users/eileencodes/followers","following_url":"https://api.github.com/users/eileencodes/following{/other_user}","gists_url":"https://api.github.com/users/eileencodes/gists{/gist_id}","starred_url":"https://api.github.com/users/eileencodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileencodes/subscriptions","organizations_url":"https://api.github.com/users/eileencodes/orgs","repos_url":"https://api.github.com/users/eileencodes/repos","events_url":"https://api.github.com/users/eileencodes/events{/privacy}","received_events_url":"https://api.github.com/users/eileencodes/received_events","type":"User","site_admin":true}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":150377,"node_id":"MDU6TGFiZWwxNTAzNzc=","url":"https://api.github.com/repos/rails/rails/labels/docs","name":"docs","color":"02d7e1","default":false},{"id":107195,"node_id":"MDU6TGFiZWwxMDcxOTU=","url":"https://api.github.com/repos/rails/rails/labels/railties","name":"railties","color":"8BE06E","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/34420/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/34420/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/34420/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/f03f935ae5cbf78c51bc6bd678cfea29c4809fb1","head":{"label":"deivid-rodriguez:abort_early_if_generator_command_fails","ref":"abort_early_if_generator_command_fails","sha":"f03f935ae5cbf78c51bc6bd678cfea29c4809fb1","user":{"login":"deivid-rodriguez","id":2887858,"node_id":"MDQ6VXNlcjI4ODc4NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/2887858?v=4","gravatar_id":"","url":"https://api.github.com/users/deivid-rodriguez","html_url":"https://github.com/deivid-rodriguez","followers_url":"https://api.github.com/users/deivid-rodriguez/followers","following_url":"https://api.github.com/users/deivid-rodriguez/following{/other_user}","gists_url":"https://api.github.com/users/deivid-rodriguez/gists{/gist_id}","starred_url":"https://api.github.com/users/deivid-rodriguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deivid-rodriguez/subscriptions","organizations_url":"https://api.github.com/users/deivid-rodriguez/orgs","repos_url":"https://api.github.com/users/deivid-rodriguez/repos","events_url":"https://api.github.com/users/deivid-rodriguez/events{/privacy}","received_events_url":"https://api.github.com/users/deivid-rodriguez/received_events","type":"User","site_admin":false},"repo":{"id":13021413,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAyMTQxMw==","name":"rails","full_name":"deivid-rodriguez/rails","private":false,"owner":{"login":"deivid-rodriguez","id":2887858,"node_id":"MDQ6VXNlcjI4ODc4NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/2887858?v=4","gravatar_id":"","url":"https://api.github.com/users/deivid-rodriguez","html_url":"https://github.com/deivid-rodriguez","followers_url":"https://api.github.com/users/deivid-rodriguez/followers","following_url":"https://api.github.com/users/deivid-rodriguez/following{/other_user}","gists_url":"https://api.github.com/users/deivid-rodriguez/gists{/gist_id}","starred_url":"https://api.github.com/users/deivid-rodriguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deivid-rodriguez/subscriptions","organizations_url":"https://api.github.com/users/deivid-rodriguez/orgs","repos_url":"https://api.github.com/users/deivid-rodriguez/repos","events_url":"https://api.github.com/users/deivid-rodriguez/events{/privacy}","received_events_url":"https://api.github.com/users/deivid-rodriguez/received_events","type":"User","site_admin":false},"html_url":"https://github.com/deivid-rodriguez/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/deivid-rodriguez/rails","forks_url":"https://api.github.com/repos/deivid-rodriguez/rails/forks","keys_url":"https://api.github.com/repos/deivid-rodriguez/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deivid-rodriguez/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deivid-rodriguez/rails/teams","hooks_url":"https://api.github.com/repos/deivid-rodriguez/rails/hooks","issue_events_url":"https://api.github.com/repos/deivid-rodriguez/rails/issues/events{/number}","events_url":"https://api.github.com/repos/deivid-rodriguez/rails/events","assignees_url":"https://api.github.com/repos/deivid-rodriguez/rails/assignees{/user}","branches_url":"https://api.github.com/repos/deivid-rodriguez/rails/branches{/branch}","tags_url":"https://api.github.com/repos/deivid-rodriguez/rails/tags","blobs_url":"https://api.github.com/repos/deivid-rodriguez/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deivid-rodriguez/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deivid-rodriguez/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/deivid-rodriguez/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deivid-rodriguez/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/deivid-rodriguez/rails/languages","stargazers_url":"https://api.github.com/repos/deivid-rodriguez/rails/stargazers","contributors_url":"https://api.github.com/repos/deivid-rodriguez/rails/contributors","subscribers_url":"https://api.github.com/repos/deivid-rodriguez/rails/subscribers","subscription_url":"https://api.github.com/repos/deivid-rodriguez/rails/subscription","commits_url":"https://api.github.com/repos/deivid-rodriguez/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/deivid-rodriguez/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/deivid-rodriguez/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/deivid-rodriguez/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/deivid-rodriguez/rails/contents/{+path}","compare_url":"https://api.github.com/repos/deivid-rodriguez/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deivid-rodriguez/rails/merges","archive_url":"https://api.github.com/repos/deivid-rodriguez/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deivid-rodriguez/rails/downloads","issues_url":"https://api.github.com/repos/deivid-rodriguez/rails/issues{/number}","pulls_url":"https://api.github.com/repos/deivid-rodriguez/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/deivid-rodriguez/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/deivid-rodriguez/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deivid-rodriguez/rails/labels{/name}","releases_url":"https://api.github.com/repos/deivid-rodriguez/rails/releases{/id}","deployments_url":"https://api.github.com/repos/deivid-rodriguez/rails/deployments","created_at":"2013-09-22T21:33:26Z","updated_at":"2018-04-23T21:21:42Z","pushed_at":"2018-12-07T03:25:29Z","git_url":"git://github.com/deivid-rodriguez/rails.git","ssh_url":"git@github.com:deivid-rodriguez/rails.git","clone_url":"https://github.com/deivid-rodriguez/rails.git","svn_url":"https://github.com/deivid-rodriguez/rails","homepage":"http://rubyonrails.org","size":154988,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":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":"rails:master","ref":"master","sha":"b86f65a816546ff8eea39d25b62c995c7efc21dc","user":{"login":"rails","id":4223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"node_id":"MDEwOlJlcG9zaXRvcnk4NTE0","name":"rails","full_name":"rails/rails","private":false,"owner":{"login":"rails","id":4223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","deployments_url":"https://api.github.com/repos/rails/rails/deployments","created_at":"2008-04-11T02:19:47Z","updated_at":"2018-12-07T03:10:02Z","pushed_at":"2018-12-07T03:25:39Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"https://rubyonrails.org","size":168727,"stargazers_count":41564,"watchers_count":41564,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16800,"mirror_url":null,"archived":false,"open_issues_count":1022,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":16800,"open_issues":1022,"watchers":41564,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/34420"},"html":{"href":"https://github.com/rails/rails/pull/34420"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/34420"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/34420/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/34420/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/34420/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/f03f935ae5cbf78c51bc6bd678cfea29c4809fb1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"deivid-rodriguez"}}