{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/6543","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/6543/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/6543/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/6543/events","html_url":"https://github.com/nodejs/node/issues/6543","id":152719823,"number":6543,"title":"discuss: tool to simplify landing of PR","user":{"login":"estliberitas","id":568962,"avatar_url":"https://avatars.githubusercontent.com/u/568962?v=3","gravatar_id":"","url":"https://api.github.com/users/estliberitas","html_url":"https://github.com/estliberitas","followers_url":"https://api.github.com/users/estliberitas/followers","following_url":"https://api.github.com/users/estliberitas/following{/other_user}","gists_url":"https://api.github.com/users/estliberitas/gists{/gist_id}","starred_url":"https://api.github.com/users/estliberitas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estliberitas/subscriptions","organizations_url":"https://api.github.com/users/estliberitas/orgs","repos_url":"https://api.github.com/users/estliberitas/repos","events_url":"https://api.github.com/users/estliberitas/events{/privacy}","received_events_url":"https://api.github.com/users/estliberitas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/discuss","name":"discuss","color":"02d7e1"},{"url":"https://api.github.com/repos/nodejs/node/labels/meta","name":"meta","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-03T08:01:47Z","updated_at":"2016-05-03T14:30:10Z","closed_at":null,"body":"* **Version**: 4.x → ∞\r\n* **Platform**: all\r\n* **Subsystem**: tools\r\n\r\nThis issues follows discussion raised in d90c42dfdc5e58047ecda8ec2cd3f1147785005b. The idea is to provide cross-platform tools to simplify landing of PR. Currently the procedure is a bit [complex](https://github.com/nodejs/node/blob/master/doc/onboarding.md#landing-prs) meaning that it requires several manual actions which can be done by some CLI tool.\r\n\r\nWe can start from automating of `git commit --ammend` like linting of commit message, adding meta-data, etc. So, the command would look like:\r\n\r\n    land-pull-request <PR ID> [-f <ISSUE1 ID>,<ISSUE2 ID>]\r\n\r\n(`-f` would specify issues which are fixed by this `PR`, so they would be added if missing yet)\r\n\r\nP.S.: there are tools by @evanlucas which we can use for implementation of such a tool:\r\nhttps://github.com/evanlucas/core-get-reviewers\r\nhttps://github.com/evanlucas/core-validate-commit\r\n\r\nWhat are your thoughts on this? There is already a discussion in #6331. But there tools for particular task are discussed - linting of commit, adding PR data. I'd like to implement a tool which would do the following:\r\n\r\n1. Get commit message, add meta-data and open it in editor\r\n2. After edit / save / exit run commit message linter, otherwise open editor again or just exit with error message\r\n3. If step 2 is OK, then finally do `git commit --amend -m \"<prepared commit message here>\"`"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/216547109","html_url":"https://github.com/nodejs/node/issues/6543#issuecomment-216547109","issue_url":"https://api.github.com/repos/nodejs/node/issues/6543","id":216547109,"user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T14:30:09Z","updated_at":"2016-05-03T14:30:09Z","body":"Would absolutely love to see this (especially after several start and stop efforts on my part to build it but never having the opportunity to finish it). \r\n\r\nThe tool should really do several things:\r\n\r\n1. It needs to collect the reviewers and ask if the person landing the tool wishes to sign off (LGTM) if they haven't done so already. In general, no one should land a PR that they personally have not signed off on so this should be the default.\r\n\r\n2. It needs to ask if the commits should be squashed and perform a `git rebase -i` to let the person landing do the squashing / editing as appropriate.\r\n\r\n3. It needs to run make lint.\r\n\r\n4. If the PR has not already been marked for LTS-watch, it should prompt the person landing to either label it lts-watch or not. Right now this is a fully manual thing in which usually either I or @TheAlphaNerd have to crawl through and pick out things that appear to be lts-related. Some collaborators have gotten better at marking things proactively but most do not.\r\n\r\n5. It needs to add the commit metadata to each of the unsquashed commits.\r\n\r\nWhile *eventually* this tool could possibly do the `git push` up to master, I agree that it should not do so quite yet. I'd prefer that git push to be manual so that the user can do a double check to make sure everything is good before pushing."}}