Closed nisarhassan12 closed 4 years ago
I have added the project manually and the stars are not displaying:
@nisarhassan12 Ah, indeed, sorry. I should have included the following hint in the error message.
The likely reason add-project
failed for you is that you got rate-limited by GitHub's API. The solution is to use the API with a Personal Access Token. Here is how to configure it:
Go to https://github.com/settings/tokens and generate a new token (e.g. call it "contribute.dev"). I think you don't need to grant it any scopes (no scopes = safer).
Copy the generated token (don't lose it, I think it's only displayed once, but also don't share it publicly, because people can use it to login to GitHub as yourself).
Create an environment variable called GITHUB_PAT
in https://gitpod.io/settings/, and paste the token into the "value" field. For the repository pattern, you can use gitpod-io/contribute.dev
to only set this variable in contribute.dev workspaces (safer).
Next time you open a contribute.dev workspace and try add-project
, it should work. 👍
EDIT: By the way, if you're interested, here is the code in add-project
that tries to detect a GITHUB_PAT
variable, and uses it to authenticate GitHub API calls:
I have added the project manually and the stars are not displaying:
This is likely a cache problem with shields.io (since this service receives many many requests, they need to heavily cache the most used badges -- so if you start using a new badge, it may be really slow to appear at first, but it should get better once it is properly cached by shields.io).
Many Thanks! :pray: @jankeromnes for the brief explanation.
I'm trying to add #83 via the
add-project
script.