Skip to content

Instantly share code, notes, and snippets.

@emanon001
Last active August 29, 2015 14:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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