Skip to content

Instantly share code, notes, and snippets.

View dennishall1's full-sized avatar

Dennis Hall dennishall1

View GitHub Profile
@dennishall1
dennishall1 / github show all outdated diff comments.js
Last active September 11, 2018 07:30
Show all outdated diff comments on a pull request in Github -- Simulate clicking on all links that say "Show outdated"
$$('.btn-link.text-gray').forEach(function(item){
if(item.innerHTML.match(/Show outdated/)){
item.dispatchEvent(new MouseEvent('click', {
view: window,
bubbles: true,
cancelable: true
}));
}
});
@dennishall1
dennishall1 / jira-sprint-stories.js
Created December 1, 2016 21:03
Get a list of sprint story #s + titles -- convenient to copy/paste into planning poker
// inspect the dom to obtain the sprintId, and update it below
sprintId = 267;
stories = [];
$$('[data-sprint-id="' + sprintId + '"] .ghx-issue-content').forEach(function(item){
stories.push([
item.querySelector('.ghx-key').innerText,
item.querySelector('.ghx-summary').innerText
].join(' '));
});
console.log(stories.join('\n'));
// pass in either location.search or location.hash, taking care to remove the leading '?' or '#' first.
function getParams(str) {
return str.split("&").reduce(function(params, keyValuePair){
keyValuePair = keyValuePair.split('=');
params[decodeURIComponent(keyValuePair[0])] = decodeURIComponent(keyValuePair[1]);
return params;
}, {});
}
@dennishall1
dennishall1 / go-pipeline-poor-mans-notify.js
Last active June 14, 2018 14:05
go (lang) pipelines - browser alert when build is done
timer = setInterval(function(){
if(!document.querySelector('a.pipeline_stage[href*="vans-test-6"]').classList.contains('building')){
clearInterval(timer);
alert('done');
}
});