github
github copied to clipboard
listStarredRepos not really doing anything
first, can this be run on a website with native js?
Second, is the listStarredRepo function bugged. I tried running it with callbacks, with the .then. used my password and then used an access token.
What i want to achieve
I want a page that lists all of my repos. That's it. I don't really need to authenticate myself since the repo data is public.
It should be able to work in a browser, but keep in mind risks associated with having your GitHub credentials exposed in a client app.
GitHub throttles unauthenticated API access, so I think you would probably still want to auth. Maybe try something like this:
const github = new Github({
username: 'myuser',
password: 'mypassword',
auth: 'basic',
});
let user = github.getUser();
user.listStarredRepos().then(result => {
console.log(result)
});
This may not be exact, but something like this should work.