Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix generate stars script #159

Merged
merged 1 commit into from
May 1, 2024
Merged

Conversation

JavierMatosD
Copy link
Collaborator

@JavierMatosD JavierMatosD commented May 1, 2024

Before:

Error fetching stars for repo:  RequestError [HttpError]: Not Found
    at /Users/javiermatos/dev/vcpkg.github.io/node_modules/@octokit/request/dist-node/index.js:88:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async getGitHubStars (/Users/javiermatos/dev/vcpkg.github.io/scripts/generateGitHubStars.js:21:26)
    at async main (/Users/javiermatos/dev/vcpkg.github.io/scripts/generateGitHubStars.js:55:23) {
  status: 404,
  response: {
    url: 'https://api.github.com/repos/artem-ogre/CDT.git',
    status: 404,
    headers: {
     ...
    },
    data: {
      message: 'Not Found',
      documentation_url: 'https://docs.github.com/rest/repos/repos#get-a-repository'
    }
  },
  request: {
    method: 'GET',
    url: 'https://api.github.com/repos/artem-ogre/CDT.git',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-rest.js/19.0.4 octokit-core.js/4.0.5 Node.js/21',
      authorization: 'token [REDACTED]'
    },
    request: { hook: [Function: bound bound register] }
  }
}

The GitHub API does not use the .git extension.

This does not work - https://api.github.com/repos/artem-ogre/CDT.git
This does work - https://api.github.com/repos/artem-ogre/CDT

This just chops off the .git from the URls

@JavierMatosD JavierMatosD marked this pull request as ready for review May 1, 2024 17:18
@JavierMatosD JavierMatosD requested a review from ras0219-msft May 1, 2024 17:18
@JavierMatosD JavierMatosD merged commit 6e1e0e9 into vcpkg:main May 1, 2024
1 check passed
@JavierMatosD JavierMatosD deleted the fix_stars_gen branch June 20, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants