Skip to content

Instantly share code, notes, and snippets.

@shorti1996
Last active May 29, 2019 12:44
Show Gist options
  • Save shorti1996/2f72bd8c1f04bf2ebe73b469598dabe7 to your computer and use it in GitHub Desktop.
Save shorti1996/2f72bd8c1f04bf2ebe73b469598dabe7 to your computer and use it in GitHub Desktop.
const $ = jQuery;
zip= rows=>rows[0].map((_,c)=>rows.map(row=>row[c]))
console.log([$('td.summary').toArray().reduce((acc, val) => {
acc.titles.push($('a.pull-request-title', val)[0].title);
acc.times.push($('time', val)[0].title);
return acc;
}, {titles: [], times: []})].map((result) => zip([result.titles, result.times]))[0]
.reduce((acc, val) => {
return acc + "\n\n" + val[0] + "\n" + val[1];
}, ""))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment