Skip to content

Instantly share code, notes, and snippets.

@pbharadiya
Last active March 4, 2022 11:40
Show Gist options
  • Save pbharadiya/7e77e3cf37f461748c5d73c8c531f331 to your computer and use it in GitHub Desktop.
Save pbharadiya/7e77e3cf37f461748c5d73c8c531f331 to your computer and use it in GitHub Desktop.
Get list of Github PR title and it's author name.
/* ##### Author: pbharadiya ##### */
// Below is the script to get all the PRs' title visible on UI. (PER_PAGE-25 for github)
// Copy-paste below line on Javascript console of Pull Requests page.
// How to open JavaScript console: Press ctrl + shift + i
var arr = Array.from(document.getElementsByClassName('Link--primary v-align-middle'));
var str = ""
arr.forEach(function(item) {
if (!item.innerText.includes('ESTATE') ) {
//console.log(item.innerText);
str += item.innerText + "\n";
}
});
console.log(str)
// Below is the script to get all the PRs' author visible on UI. (PER_PAGE-25 for github)
// Copy-paste below line on Javascript console of Pull Requests page.
var commit = Array.from(document.querySelectorAll('.opened-by .muted-link'));
var str = ""
commit.forEach(function(item) {
str += item.innerText + "\n";
});
str
// Below is the script to get all the PRs' title along with author visible on UI. (PER_PAGE-25 for github)
// Copy-paste below line on Javascript console of Pull Requests page.
var arr = Array.from(document.getElementsByClassName('link-gray-dark'));
var commit = Array.from(document.querySelectorAll('.opened-by .muted-link'));
var str = ""
arr.forEach(function(item, index) {
str += '- ' + item.innerText + '[' + commit[index].innerText + ']' + "\n";
});
str
//Sample output from https://github.com/rails/rails/pulls?q=is%3Apr+is%3Aclosed
/*
- Ensure that `mini_magick` is absent after `rails new` with `--skip-active-storage` [bogdanvlviv]
- Fix generation of empty content security policy [pixeltrix]
- Return all mappings for a timezone id in country_zones [pixeltrix]
- rubocop single space after assignment [dixitp012]
- Do not check `ActiveStorage::Engine` when updating to 5.2 [y-yagi]
- 5-0-stable: PERF: Recover marshaling dump/load performance [kamipo]
- Fix active_job_basics.md callbacks example [ci skip] [fatkodima]
/*
/* Date updated: 21-Feb-2018 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment