haghish / github

a module for building, searching, installing, managing, and mining Stata packages from GitHub
http://haghish.github.io/github/
101 stars 41 forks source link

Fix reading tags when repository has been transferred to another user #24

Open randrescastaneda opened 2 years ago

randrescastaneda commented 2 years ago

Dear @haghish ,

First of all, thank you so much for the github command. It is fantastic. I think it will revolutionize the way people work and contribute in Stata.

Problem

I found an issue with github query when a repo has been transferred to a new user. My understanding of the problem is that the Github API returns values in a different order when the repo has been transferred. In the first image below, the current version of github works fine when I query the original repo pip-technical-team/pip, but It fails when I call the new official repo, worldbank/pip (second image).

working fine

image

Failing

image

Solution

In this PR, I made some modifications so it always reads the tags correctly. image

Best,

haghish commented 2 years ago

thanks a lot for your work. can you update the code to support Stata 14 and up?

randrescastaneda commented 2 years ago

thanks a lot for your work. can you update the code to support Stata 14 and up?

DONE!

Unless I am doing something wrong, I changed to version 14 at the top of the githubquery.ado file and it kept working fine.

Best,