Skip to content

Instantly share code, notes, and snippets.

@calebwoods
Last active January 3, 2016 12:59
Show Gist options
  • Select an option

  • Save calebwoods/8466688 to your computer and use it in GitHub Desktop.

Select an option

Save calebwoods/8466688 to your computer and use it in GitHub Desktop.

Revisions

  1. calebwoods revised this gist Jan 17, 2014. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions bookmarklet.js
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,6 @@
    javascript:(function () {
    var mergeButton = $('.merge-branch-action.js-details-target');
    var mergeMessage = $('.merge-commit-message');

    mergeButton.click();

    if (mergeMessage.length > 0) {
    prNum = location.pathname.split('/').slice(-1)[0];
    var prTitle = $('.discussion-topic-title').text();
  2. calebwoods created this gist Jan 17, 2014.
    12 changes: 12 additions & 0 deletions bookmarklet.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    javascript:(function () {
    var mergeButton = $('.merge-branch-action.js-details-target');
    var mergeMessage = $('.merge-commit-message');

    mergeButton.click();

    if (mergeMessage.length > 0) {
    prNum = location.pathname.split('/').slice(-1)[0];
    var prTitle = $('.discussion-topic-title').text();
    mergeMessage.val('' + prTitle + ' [KB #NUMBER] (GH #' + prNum + ')');
    }
    })();