Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danwahlin/github-repo-stats
https://github.com/danwahlin/github-repo-stats
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/danwahlin/github-repo-stats
- Owner: DanWahlin
- Created: 2022-07-07T21:07:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-01T18:20:27.000Z (over 1 year ago)
- Last Synced: 2024-10-06T10:42:04.059Z (5 months ago)
- Language: JavaScript
- Size: 47.9 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example of Using the GitHub API to Get a Repository's Clone, Fork, and View Count
1. `npm install`
1. Run `node getStats.js`*NOTE* You must have pull access to a repository for this to work correctly.
## To Run Azure Functions Locally
1. Update the `GITHUB_REPOS` values in `local.settings.json` as needed.
1. Run `npm start`
1. Visit the URL displayed in the console.## Deploying to Azure Functions
1. Add the `GITHUB_REPOS` value (see example below) into your key vault as a secret (named `github-repos`).
```json
[ { "owner": "microsoft", "repo": "MicrosoftCloud", "token": "TOKEN_VALUE" }, { "owner": "microsoft", "repo": "brainstorm-fluidframework-m365-azure", "token": "TOKEN_VALUE" } ]
```1. Select the command pallet's `Azure Functions: Deploy to Function App` option.
1. Note that if the key vault `GITHUB_REPOS` value is updated, you may need to go into the function configuration in the portal and remove (or add it if it's not there) the last `/`. Otherwise, the function may cache the key vault value even after it is restarted.