- Create a GitHub Personal Access Token with the
read:org
permission. - Copy the contents of
bookmarklet.js
and replace the placeholders with your specific values. - Add a new bookmark to your browser using that as the URL.
Last active
December 4, 2019 18:22
-
-
Save lgfa29/69f8b9f4e18a39696883c6596bb34427 to your computer and use it in GitHub Desktop.
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
javascript:user="YOUR USERNAME",token="YOUR TOKEN",org="TEAM ORG",team="TEAM NAME",repos=["OWNER/REPO","OWNER/REPO2"],openOnly=true,internalOnly=false,query=[],opts={headers:{Authorization:"Basic "+btoa(user+":"+token)}},fetch("https://api.github.com/orgs/"+org+"/teams/"+team,opts).then(r=>{r.json().then(t=>{fetch("https://api.github.com/teams/"+t.id+"/members",opts).then(r=>{r.json().then(d=>{openOnly&&query.push(encodeURIComponent("is:open")),repos.map(repo=>query.push(encodeURIComponent("repo:"+repo))),d.map(m=>query.push((internalOnly?"":"-")+encodeURIComponent("author:"+m.login))),window.location="https://github.com/search?type=Issues&q="+query.join("+")})})})}); |
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
user='YOUR USERNAME'; | |
token='YOUR TOKEN'; | |
org='TEAM ORG'; | |
team='TEAM NAME'; | |
repos=['OWNER/REPO','OWNER/REPO2']; | |
openOnly=true; | |
internalOnly=false; | |
query = []; | |
opts = { headers: { 'Authorization': 'Basic ' + btoa(user+':'+token) } }; | |
fetch('https://api.github.com/orgs/'+org+'/teams/'+team, opts).then(r => { | |
r.json().then(t => { | |
fetch('https://api.github.com/teams/'+t.id+'/members', opts).then(r => { | |
r.json().then(d => { | |
if (openOnly) { query.push(encodeURIComponent('is:open')); } | |
repos.map(repo => query.push(encodeURIComponent('repo:'+repo))); | |
d.map(m => query.push((internalOnly ? '': '-')+encodeURIComponent('author:'+m.login))) | |
window.location='https://github.com/search?type=Issues&q='+query.join('+'); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment