git-it-write icon indicating copy to clipboard operation
git-it-write copied to clipboard

Get GitHub info

Open tblobaum opened this issue 2 years ago • 2 comments

Is there a way to retrieve the github credentials in php? I am working on a news aggregator theme and it requires git-it-write so it would be better if I could just retrieve the github credentials programmatically instead of asking the user to enter them into a separate settings page.

tblobaum avatar Jun 29 '23 19:06 tblobaum

IMG_6491

tblobaum avatar Jun 30 '23 15:06 tblobaum

Hi @tblobaum,

AFAIK, the access token must be manually created by the user and that access token must be entered in the settings page. Please do check Github REST API and documentation to see if any shortcut is possible.

Previously Git it write did not accept any username and access token and later to support private repositories this feature was added. As I remember username and access token are not needed for public repositories. The open access has some restrictions too. But you can give it a try without any username and access token and see if it works for you. You need to comment the below line for now. https://plugins.trac.wordpress.org/browser/git-it-write/trunk/includes/repository.php#L35

Thanks, Aakash

vaakash avatar Jun 30 '23 19:06 vaakash