-
Notifications
You must be signed in to change notification settings - Fork 0
The first MVP build #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8031b8a
Fast setup
roboloop 1dde916
Handshake with GitHub API
roboloop 7321150
Table Of Contents loader and put sheet management
roboloop 3bfdff7
An extra file for easy debugging on Spreadsheet's side
roboloop 48d4877
Mock file for future test cases
roboloop 2c79251
Fully loader all solutions (stars, issues, PRs, tags). Integration wi…
roboloop 700fcc2
Covering the codebase with tests. Some fixes
roboloop 019a4db
Last release and total releases were added
roboloop 1a5fb6b
Changed the error message if it is not GitHub repository
roboloop fb8108c
Friendly-user README.md
roboloop 81444e6
The first version of CI/CD
roboloop 721b6f0
Update README.md
roboloop 42f1547
Fixes for coderabbit
roboloop 55418da
Linter fixes
roboloop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "scriptId": "", | ||
| "rootDir": "./dist", | ||
| "fileExtension": "js", | ||
| "filePushOrder": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| VITE_GITHUB_TOKEN= | ||
| VITE_STARS_EXPLORER_URL= | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: CI/CD Pipeline | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint & Format Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run ESLint | ||
| run: npm run lint | ||
|
|
||
| - name: Run Prettier Check | ||
| run: npm run prettier | ||
|
|
||
| test: | ||
| name: Run Tests | ||
| runs-on: ubuntu-latest | ||
| needs: lint | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run Tests | ||
| run: npm run test | ||
|
|
||
| build: | ||
| name: Build Project | ||
| runs-on: ubuntu-latest | ||
| needs: test | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build the project | ||
| run: npm run build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| node_modules | ||
| dist | ||
| *.local | ||
| .clasp.json | ||
|
|
||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
|
|
||
| # Editor directories and files | ||
| .vscode/* | ||
| !.vscode/extensions.json | ||
| .idea | ||
| .DS_Store | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| dist/ | ||
| .clasp.json | ||
| .clasp.json.example | ||
| appsscript.json | ||
| appsscript.json.example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "semi": false, | ||
| "singleQuote": true, | ||
| "arrowParens": "avoid", | ||
| "printWidth": 100, | ||
| "plugins": ["prettier-plugin-organize-imports"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # awesome-things | ||
|
|
||
| Have you faced ever with the challenge of choosing the right solutions among many alternatives? | ||
|
|
||
| **awesome-things** helps you organize all the options in one table, compare the numbers of stars, open/closed issues/PRs, track the project's dynamic and ultimately make an informed which solution to pick. | ||
|
|
||
| The project uses data from awesome-\* repositories, like as [awesome-python](https://github.com/vinta/awesome-python), extracts and parses the data (only from GitHub repositories), and generates a neat spreadsheet table that integrates seamlessly with Google Spreadsheets via Apps Script. | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Google Account | ||
| - GitHub Account | ||
|
|
||
| ## Setup (local usage only) | ||
|
|
||
| 1. Clone this repository | ||
|
|
||
| ```shell | ||
| git clone https://github.com/roboloop/awesome-things | ||
| ``` | ||
|
|
||
| 2. Install [clasp](https://github.com/google/clasp) and grand access | ||
|
|
||
| ```shell | ||
| npm install -g @google/clasp | ||
|
|
||
| # Log in and grant access to Apps Script functionality | ||
| clasp login | ||
| ``` | ||
|
|
||
| 3. Associate the cloned project with your Google Spreadsheets | ||
|
|
||
| 1. Enable the Google Apps Script API [here](https://script.google.com/home/usersettings) | ||
|
|
||
| 2. Create a blank Google Spreadsheets [here](https://docs.google.com/spreadsheets/u/0/create?usp=sheets_web) | ||
|
|
||
| 3. Go to `Extensions` —> `Apps Script` | ||
|
|
||
| 4. On the Apps Script page, open `Settings` and copy the Script ID | ||
|
|
||
| 5. Create a `.clasp.json` file: | ||
|
|
||
| ```shell | ||
| cp .clasp.json.example .clasp.json | ||
| ``` | ||
|
|
||
| 6. Paste the Script ID into the `scriptId` field | ||
|
|
||
| 4. Set up a GitHub Personal Access Token | ||
|
|
||
| 1. Get a PAT [here](https://github.com/settings/personal-access-tokens) (no scopes required) | ||
|
|
||
| 2. Create a `.env.local` | ||
|
|
||
| ```shell | ||
| cp .env .env.local | ||
| ``` | ||
|
|
||
| 3. Add the GitHub token to `.env.local` file | ||
|
|
||
| 5. _(Optional)_ Integrate [daily-stars-explorer](https://github.com/emanuelef/daily-stars-explorer) to check extended GitHub repository statistics: | ||
|
|
||
| 1. Add the address to `.env.local` file: | ||
|
|
||
| ``` | ||
| VITE_STARS_EXPLORER_URL=127.0.0.1:8080 | ||
| ``` | ||
|
|
||
| 2. Run the instance (it retrieves the PAT and address from `.env.local` file): | ||
|
|
||
| ```shell | ||
| docker run --rm --name daily-stars-explorer \ | ||
| --env PAT="$(sed -n 's/^VITE_GITHUB_TOKEN=//p' .env.local)" \ | ||
| --publish "$(sed -n 's/^VITE_STARS_EXPLORER_URL=//p' .env.local)":8080 \ | ||
| ghcr.io/emanuelef/daily-stars-explorer:latest | ||
| ``` | ||
|
|
||
| 6. Deploy the project with following command: | ||
|
|
||
| ```shell | ||
| npm run deploy | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| 1. Refresh the Google Spreadsheet page | ||
|
|
||
| 2. Load the Table of Contents: | ||
|
|
||
| 1. In the `Awesome Things` menu, select `Load Table of Contents` | ||
|
|
||
| 2. Enter the GitHub repository link, e.g., <https://github.com/vinta/awesome-python> | ||
| 3. The `ToC` sheet will be populated | ||
|
|
||
| 3. Load the specific thing: | ||
|
|
||
| 1. Select the cell with the interesting item | ||
|
|
||
| 2. In the `Awesome Things` menu, select `Load Things` | ||
|
|
||
| 3. A new sheet will be created and filled with data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "timeZone": "UTC", | ||
| "dependencies": {}, | ||
| "exceptionLogging": "STACKDRIVER", | ||
| "runtimeVersion": "V8" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /// <reference types="google-apps-script" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // @ts-check | ||
|
|
||
| import eslint from '@eslint/js' | ||
| import tseslint from 'typescript-eslint' | ||
|
|
||
| export default tseslint.config( | ||
| eslint.configs.recommended, | ||
| tseslint.configs.recommended, | ||
| { | ||
| ignores: ['dist/'], | ||
| }, | ||
| { | ||
| rules: { | ||
| '@typescript-eslint/no-unused-vars': 'off', | ||
| }, | ||
| }, | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.