https://github.com/pulls?user=matrix-hacks replace matrix-hacks with your own
Last active
August 8, 2024 21:47
-
-
Save kfatehi/ff12772c852da1fe8a2c88a5e3f1bfb3 to your computer and use it in GitHub Desktop.
list pull requests across entire organization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('bluebird') | |
var GitHubApi = require("github"); | |
const org = "matrix-hacks"; | |
var github = new GitHubApi({ Promise }); | |
github.repos.getForOrg({ org, type: 'sources' }) | |
.then(res=>res.data.map(i=>i.name)) | |
.then(repos=>{ | |
return Promise.map(repos, (repo) => { | |
return github.pullRequests.getAll({ | |
state: 'open', | |
owner: org, | |
repo | |
}); | |
}) | |
}) | |
.then((allReposPrs) => { | |
allReposPrs.forEach(thisRepoPrs=>{ | |
thisRepoPrs.data.forEach(pr => { | |
const { | |
_links, | |
title, | |
body, | |
created_at, | |
updated_at, | |
user: { login }, | |
number, | |
} = pr; | |
const baseName = pr.base.repo.name; | |
console.log([ | |
`Pull request`, | |
`\tRepo: ${pr.base.repo.name}`, | |
`\tAuthor: ${login}`, | |
`\tTitle: ${title}`, | |
`\tURL: ${_links.html.href}`, | |
].join('\n')); | |
}); | |
}) | |
}); |
You can also do this via the website by using:
https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3AORG+archived%3Afalse+
Replacing
ORG
with the desired org name.
This was what I was looking for, thanks! 👍
You can also do this via the website by using:
https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3AORG+archived%3Afalse+
Replacing ORG with the desired org name.
Or more simply:
https://github.com/pulls?user=ORG
@jeremywadsack Nice 👏. I didn't know it would only show open PRs by default.
https://github.com/pulls?user=ORG
+1
Thank you!
Thanks!
Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can also do this via the website by using:
https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3AORG+archived%3Afalse+
Replacing
ORG
with the desired org name.