Skip to content

Instantly share code, notes, and snippets.

@jasonmerino
Created September 30, 2014 15:38
Show Gist options
  • Save jasonmerino/0031f4d3936b81f98569 to your computer and use it in GitHub Desktop.
Save jasonmerino/0031f4d3936b81f98569 to your computer and use it in GitHub Desktop.
Get a users submitted pull requests for a specific organization and repo
javascript:(function () {
function twoDigits(number) {
return number.toString().length === 1 ? '0' + number : number;
}
var date = new Date((new Date()).getTime()-1000*60*60*24*7),
org = 'jquery',
repo = 'jquery',
filters = [
'is:pr',
'author:jasonmerino',
'created:>' + [
date.getFullYear(),
twoDigits(date.getMonth() + 1),
twoDigits(date.getDate())
].join('-')
],
baseUrl = 'https://github.com/' + org + '/' + repo + '/pulls?q=';
window.location.href = baseUrl + filters.join('+');
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment