react-native/bots/pr-inactivity-bookmarklet.js
Satyajit Sahoo dad6e290f8 Improve bookmarklets to include author name
Summary:Including author's name makes the replies more personalized.
Closes https://github.com/facebook/react-native/pull/6545

Differential Revision: D3074715

Pulled By: mkonicek

fb-gh-sync-id: ac21ddc2c2864585c3a16ad0be7619ba432831b3
shipit-source-id: ac21ddc2c2864585c3a16ad0be7619ba432831b3
2016-03-20 11:54:27 -07:00

2 lines
571 B
JavaScript

javascript:(function(){$('#new_comment_field')[0].value='Hey @' + $(".timeline-comment-header-text").first().find(".author").text() + '! Thanks for making the pull request, but we are closing it due to inactivity (' + Math.round(Math.abs((Date.now() - new Date($(".timeline-comment-header-text").last().find("time").attr("datetime")).getTime())/(24*60*60*1000))) + ' days with no activity). If you want to get your proposed changes merged, please rebase your branch with master and send a new pull request. :)';/*$('button.btn-primary:contains("Comment")').click()*/})()