Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashwin-pc/github-data-analysis-cli
https://github.com/ashwin-pc/github-data-analysis-cli
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ashwin-pc/github-data-analysis-cli
- Owner: ashwin-pc
- Created: 2023-01-10T22:55:53.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-08T00:21:47.000Z (9 months ago)
- Last Synced: 2024-04-30T04:43:43.752Z (7 months ago)
- Language: TypeScript
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# GitHub Data Analysis CLI Tool
This is a command-line interface (CLI) tool for analyzing data from GitHub repositories using the GitHub GraphQL API.## Prerequisites
- Deno
- A personal access token from GitHub with the read:user and read:org permissions.## Installation
Deno scripts do not require installation## Usage
To use the CLI tool, run the following command:```
deno run# e.g.
deno run explore.ts
```This will start the script and print the reults in the console or into a file depending on the script
### Adding the personal access token for github
Create a `.env` file and add a line entry as follows
```
ACCESS_TOKEN=xxx
```The scripts can then pickup the access token and execute the api calls
## Using the github graphql explorer
Use the GitHub GraphQL Explorer to test your queries. First make sure you have a GitHub account and are logged in. Then, go to the Explorer page by navigating to https://docs.github.com/en/graphql/overview/explorer.
Once on the Explorer page, you can start by typing in a query in the left-hand panel. The query will automatically be executed and the results will be displayed in the right-hand panel. You can also use the dropdown menus and autocomplete suggestions to help you construct your query.
Use the `explore.ts` script to run the query and transform its response for data analysis
## Useful scripts
### Backport checkTo validate if each Pr that needs to be backported has a corresponding backport Pr that is either open or as been merged, run the backport check script
```
deno run --allow-all ./useful_scripts/backport_check/index.ts
```