Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
starlord
starlord
sync stars from github -> npm
* must be logged in to npm
* must have git config github.user set? or pass via flag?
- fetch current npm starred
npm stars
- fetch current github starred
https://api.github.com/users/:me:/starred
- for each github starred
- fetch package.json
- https://raw.githubusercontent.com/:owner:/:repo:/master/package.json
- if 404 its not a valid repo
- capture the "name" field
- generate list of package.name from github
- wait for both to finish
- generate list of repos to star in npm
- remove existing npm stars from github list by comparing package.name
- present list of repos that will be starred and wait for confirmation from user (Y)
- for each name in the github list that is left
- npm star :name:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.