Created
July 28, 2015 22:40
-
-
Save Flet/9b558b3607353ef49f90 to your computer and use it in GitHub Desktop.
starlord
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
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