Skip to content

Instantly share code, notes, and snippets.

@emanon001
Last active August 29, 2015 14:00
Show Gist options
  • Save emanon001/1f618ecba6e536a489af to your computer and use it in GitHub Desktop.
Save emanon001/1f618ecba6e536a489af to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Github WIP pull request
// @namespace https://github.com/emanon001/
// @description Github での WIP pull request 運用を便利にするあれこれ
// @include https://github.com/*/pull/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
(function () {
"use strict";
// WIP の場合はマージボタンを無効にする
var issueTitle = $('span.js-issue-title').text();
if (/\[WIP\]/.test(issueTitle)) {
$('button.merge-branch-action').removeClass('primary').attr('disabled', 'disabled');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment