Open azurechen opened 8 years ago
You need to be logged in to github to star repositories, so this feature would mean we'd need a way to let users log in to GH in Alcatraz right?
Yes, I think the login feature is necessary, it may not be easy but it is possible. @jurre How do you think?
Is it really that much extra work to just use the github link and star it there?
I am always lazy to open the link and star it, I don't know how the other users thinking. Just an idea for your reference :)
But I think the work is not quite hard, according to the API doc https://developer.github.com/v3/activity/starring/
To star a repo, just run the following command
curl -i -u user:name -X PUT https://api.github.com/user/starred/:owner/:repo
Example
curl -i -u azurechen:******* -X PUT https://api.github.com/user/starred/azurechen/R.swift-plugin
Removing the star is easy too
curl -i -u user:name -X DELETE https://api.github.com/user/starred/:owner/:repo
It may be the easiest way to star/unstar a repo. But store the username and password in Alcatraz app is necessary.
Another way is using OAuth2 and get authorization by webview. https://developer.github.com/v3/oauth/ It will be more complicate and the Alcatraz app should add a function to open a WebView (I guess)
It may not need to display the stars number as issue-422 mentioned. But I think adding a button to quickly star a plugin can encourage the developer.