Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
1ed5328
Replace Jest with Vitest for testing framework and update configuration
teociaps Jan 18, 2025
84f0fc1
Migrate tests from Jest to Vitest and update related configurations
teociaps Jan 18, 2025
4633150
Remove Jest type definitions from package.json
teociaps Jan 18, 2025
531bcc7
Add unit tests for chart styles, themes, and utility functions
teociaps Jan 19, 2025
d079072
Validate chart dimensions and handle errors in createBubbleChart func…
teociaps Jan 20, 2025
7aaed9d
Fixed API tests
teociaps Jan 21, 2025
f162db9
Refactor GitHub service tests to use mockGraphQL and improve readability
teociaps Jan 21, 2025
8223c9f
Move API tests from index.test.ts to default.test.ts for better organ…
teociaps Jan 21, 2025
536df43
Add test coverage config
teociaps Jan 21, 2025
561e5d2
Merge pull request #21 from teociaps/update-language-mappings
teociaps Jan 25, 2025
9242df3
Enhance GitHub error handling and add tests for custom error classes
teociaps Jan 25, 2025
fd0da56
Refactor fetchConfigFromRepo function for improved error handling and…
teociaps Jan 25, 2025
b0a8d6d
Add supertest for API testing and create initial test suite for Expre…
teociaps Jan 25, 2025
9279762
Add tests for bubble chart generator to validate special character ha…
teociaps Jan 25, 2025
e4f6af3
Update GitHub Actions workflow to run tests with coverage
teociaps Jan 25, 2025
d2ebad9
Merge branch 'main' into tests
teociaps Jan 25, 2025
5113f63
Merge pull request #22 from teociaps/tests
teociaps Jan 25, 2025
0b1a3aa
npm deps update(deps): bump vite in the npm_and_yarn group
dependabot[bot] Jan 25, 2025
591d86d
Refactor bubble data tests to use mock data and improve readability
teociaps Jan 26, 2025
e149f3d
Merge pull request #24 from teociaps/tests
teociaps Jan 26, 2025
2cf884a
Merge pull request #23 from teociaps/dependabot/npm_and_yarn/npm_and_…
teociaps Jan 26, 2025
cf499fe
Refactor percentage display handling in bubble chart options
teociaps Jan 26, 2025
ebd5c08
Add tests for percentage display option handling
teociaps Jan 26, 2025
6a15e05
Refactor utility methods in CustomURLSearchParams to simplify error h…
teociaps Jan 26, 2025
8b67529
npm deps update(deps-dev): bump @types/node from 22.10.7 to 22.10.10
dependabot[bot] Jan 27, 2025
f13876d
Update package.json to add keywords, bugs URL, homepage, and engines …
teociaps Jan 27, 2025
f2bb619
Merge pull request #25 from teociaps/dependabot/npm_and_yarn/types/no…
teociaps Jan 27, 2025
357909d
Add Prettier and ESLint configurations
teociaps Jan 28, 2025
bc8a837
Fix formatting issues and ensure consistent newline usage across mult…
teociaps Jan 28, 2025
bfd6da5
Enhance ESLint configuration and add TypeScript support for linting
teociaps Jan 30, 2025
29d9e38
Refactor test imports and improve type usage in various test files
teociaps Jan 30, 2025
f876a38
Refactor type annotations and improve function signatures across mult…
teociaps Jan 31, 2025
096e620
Add VSCode configuration for Prettier and ESLint extensions
teociaps Jan 31, 2025
c3a9538
Add Husky for pre-commit linting and update configurations
teociaps Jan 31, 2025
37d01d8
Fix formatting settings
teociaps Jan 31, 2025
a88d474
Add Vercel development start script to package.json
teociaps Jan 31, 2025
769f669
Update pre-commit hook and lint-staged configuration
teociaps Jan 31, 2025
b82baf4
GitHub Actions update(deps): Bump actions/stale from 9.0.0 to 9.1.0
dependabot[bot] Feb 1, 2025
1589f71
GitHub Actions update(deps): Bump codecov/codecov-action from 3 to 5
dependabot[bot] Feb 1, 2025
cdd26fd
Merge pull request #26 from teociaps/dependabot/github_actions/action…
teociaps Feb 1, 2025
fc36419
Merge pull request #27 from teociaps/dependabot/github_actions/codeco…
teociaps Feb 1, 2025
05b64e4
Add logger utility and update error handling to use logger
teociaps Feb 1, 2025
3a20d2b
Enhance bubble chart generator with additional validation and error h…
teociaps Feb 2, 2025
96e2878
Add GitHub Actions workflow for linting on pull requests
teociaps Feb 2, 2025
7d6b506
Add Codecov configuration file for coverage reporting
teociaps Feb 2, 2025
9230c23
Add rate limiting to API endpoint and update dependencies
teociaps Feb 2, 2025
e1b33fe
npm deps update(deps-dev): bump @types/node from 22.10.10 to 22.13.0
dependabot[bot] Feb 3, 2025
5350d68
Fix environment variable naming in update-language-mappings workflow
teociaps Feb 3, 2025
195200a
Refactor GitHub Actions workflows to combine linting with testing and…
teociaps Feb 3, 2025
a454315
Merge pull request #28 from teociaps/dependabot/npm_and_yarn/types/no…
teociaps Feb 3, 2025
e0d1784
Add GitHub Actions workflow to mark stale issues and pull requests
teociaps Feb 3, 2025
e364b2d
Add GitHub Actions labeler workflow and configuration for issues and …
teociaps Feb 3, 2025
d4f034e
Update workflows to use latest versions of gh actions
teociaps Feb 3, 2025
6d0e142
npm deps update(deps-dev): bump vitest in the npm_and_yarn group
dependabot[bot] Feb 4, 2025
6dce5fe
Update example-config.json
teociaps Feb 6, 2025
d37550e
Set trust proxy for rate limiter in API
teociaps Feb 6, 2025
28da3fa
Add Vercel deployment workflow and update package.json
teociaps Feb 8, 2025
c95ab9e
Add example environment configuration file
teociaps Feb 8, 2025
412d8b3
npm deps update(deps-dev): bump @vitest/coverage-v8 from 3.0.3 to 3.0.5
teociaps Feb 8, 2025
3303f47
Merge pull request #29 from teociaps/dependabot/npm_and_yarn/npm_and_…
teociaps Feb 8, 2025
1673aad
Disable auto deployment for the main branch in favor of custom workflow
teociaps Feb 8, 2025
2b41429
Disable format on save in VSCode settings
teociaps Feb 8, 2025
72f12c5
Improved Vercel deployment workflow
teociaps Feb 8, 2025
1b59d5c
Update start script to include build step and adjust output directory…
teociaps Feb 8, 2025
9ee058e
Refactor percentage display options to use displayValues and update r…
teociaps Feb 8, 2025
1568381
Add unit tests for logger functionality
teociaps Feb 8, 2025
75395e4
Enhance tests for custom-config mode and styles
teociaps Feb 8, 2025
842c539
Filter out invalid data items in fetchConfigFromRepo and fix example-…
teociaps Feb 9, 2025
205bfcc
Merge branch 'main' into chores
teociaps Feb 9, 2025
e5bd8ba
Fix Prettier check command in test workflow
teociaps Feb 9, 2025
e626bd6
Refactor retry logic to handle GitHub errors more efficiently
teociaps Feb 9, 2025
0ce4cf4
npm deps update(deps-dev): bump @types/node from 22.13.0 to 22.13.1
dependabot[bot] Feb 10, 2025
3b40c2c
Update codecov configuration
teociaps Feb 11, 2025
cbd426e
Disable patch coverage reporting in codecov configuration
teociaps Feb 11, 2025
e475ec3
Merge pull request #31 from teociaps/dependabot/npm_and_yarn/types/no…
teociaps Feb 12, 2025
2df1787
Merge pull request #30 from teociaps/chores
teociaps Feb 12, 2025
3c53c54
GitHub Actions update(deps): Bump codecov/codecov-action from 3 to 5
dependabot[bot] Feb 12, 2025
2371262
npm deps update(deps-dev): bump @typescript-eslint/parser
dependabot[bot] Feb 12, 2025
c07a73a
npm deps update(deps-dev): bump prettier from 3.4.2 to 3.5.0
dependabot[bot] Feb 12, 2025
18be03a
npm deps update(deps-dev): bump eslint from 9.19.0 to 9.20.1
dependabot[bot] Feb 12, 2025
729074c
npm deps update(deps-dev): bump @typescript-eslint/eslint-plugin
dependabot[bot] Feb 12, 2025
0650c34
Merge pull request #32 from teociaps/dependabot/github_actions/codeco…
teociaps Feb 13, 2025
7bc32df
Merge pull request #33 from teociaps/dependabot/npm_and_yarn/typescri…
teociaps Feb 13, 2025
e7eab04
Merge pull request #34 from teociaps/dependabot/npm_and_yarn/prettier…
teociaps Feb 13, 2025
5521332
Merge pull request #35 from teociaps/dependabot/npm_and_yarn/eslint-9…
teociaps Feb 13, 2025
90ec7e6
Merge branch 'main' into dependabot/npm_and_yarn/typescript-eslint/es…
teociaps Feb 13, 2025
806874f
Merge pull request #36 from teociaps/dependabot/npm_and_yarn/typescri…
teociaps Feb 13, 2025
a6b02e5
Update Vercel action version and adjust arguments in deployment workflow
teociaps Feb 13, 2025
0100529
Merge branch 'main' into chores
teociaps Feb 13, 2025
f313b82
Merge pull request #38 from teociaps/chores
teociaps Feb 13, 2025
c96c4c5
Update deployment workflow to set default environment to Preview and …
teociaps Feb 13, 2025
cc63da7
Merge branch 'main' into chores
teociaps Feb 13, 2025
5397696
Merge pull request #39 from teociaps/chores
teociaps Feb 13, 2025
2166484
Update Codecov action version to v5.3.1 in test workflow
teociaps Feb 14, 2025
4bf2648
Update Codecov action version to v5.3.1 in test workflow
teociaps Feb 14, 2025
3115dca
Merge branch 'chores' of https://github.com/teociaps/github-bubble-ch…
teociaps Feb 14, 2025
347d61a
Merge pull request #41 from teociaps/chores
teociaps Feb 14, 2025
0017b1c
npm deps update(deps): bump @octokit/endpoint in the npm_and_yarn group
dependabot[bot] Feb 14, 2025
082fe9a
Merge pull request #40 from teociaps/dependabot/npm_and_yarn/npm_and_…
teociaps Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
26 changes: 26 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Server Port (e.g., 9000)
PORT=9000

# GitHub Personal Access Token for API requests (replace with your token)
GITHUB_TOKEN=your_github_token_here

# Cache duration (in seconds) for generated SVG files (e.g., 14400 seconds = 4 hours)
CACHE_MAX_AGE=14400

# Default delay (in milliseconds) between GitHub API requests when retrying (e.g., 1000ms)
DEFAULT_GITHUB_RETRY_DELAY=1000

# Maximum number of retry attempts for GitHub API calls (e.g., 3)
DEFAULT_GITHUB_MAX_RETRY=3

# URL for retrieving Devicon assets (ensure it ends with a slash)
DEVICON_URL='https://raw.githubusercontent.com/devicons/devicon/master/icons/'

# URL to fetch GitHub Linguist language definitions
LINGUIST_GITHUB='https://raw.githubusercontent.com/github/linguist/main/lib/linguist/languages.yml'

# Base URL for language mappings file location
LANGUAGE_MAPPINGS_URL='https://raw.githubusercontent.com/teociaps/github-bubble-chart/main/'

# Node Environment (set to 'dev' for local development and 'prod' for production)
NODE_ENV=dev
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These are supported funding model platforms

github: [teociaps]
custom: ["https://paypal.me/teociaps"]
custom: ['https://paypal.me/teociaps']
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 🐞 Bug Report
description: Report an anomaly or unexpected behavior from this repository.
title: "[Bug]: "
title: '[Bug]: '
labels: ['needs: triage', 'bug']

body:
Expand Down Expand Up @@ -64,4 +64,4 @@ body:
description: Please provide any relevant logs or screenshots to help us understand the issue.
placeholder: Attach logs or screenshots here.
validations:
required: false
required: false
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
blank_issues_enabled: true
blank_issues_enabled: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 💡 Feature Request
description: Suggest a new feature/enhancement for this project.
title: "[Feature]: "
title: '[Feature]: '
labels: ['enhancement']

body:
Expand Down Expand Up @@ -51,4 +51,4 @@ body:
- Medium
- Low
validations:
required: true
required: true
21 changes: 21 additions & 0 deletions .github/config/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
documentation:
- changed-files:
- any-glob-to-any-file:
- README.md
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
- SECURITY.md

dependencies:
- changed-files:
- any-glob-to-any-file:
- package.json
- yarn.lock

configuration:
- changed-files:
- any-glob-to-any-file:
- .eslintrc*
- .prettierrc*
- .editorconfig
- .stylelintrc*
36 changes: 18 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "weekly"
interval: 'weekly'
commit-message:
prefix: "npm deps update"
include: "scope"
prefix: 'npm deps update'
include: 'scope'
open-pull-requests-limit: 10
assignees:
- "teociaps"
- 'teociaps'
reviewers:
- "teociaps"
- 'teociaps'
labels:
- "dependencies"
- "npm"
- package-ecosystem: "github-actions"
directory: "/"
- 'dependencies'
- 'npm'
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "monthly"
interval: 'monthly'
commit-message:
prefix: "GitHub Actions update"
include: "scope"
prefix: 'GitHub Actions update'
include: 'scope'
open-pull-requests-limit: 10
assignees:
- "teociaps"
- 'teociaps'
reviewers:
- "teociaps"
- 'teociaps'
labels:
- "dependencies"
- "github-actions"
- 'dependencies'
- 'github-actions'
10 changes: 9 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Pull Request Template

## **Checklist**

Before submitting your PR, confirm the following:

- [ ] Commit messages follow the [contribution guidelines](https://github.com/teociaps/github-bubble-chart/blob/main/CONTRIBUTING.md).
- [ ] Tests are added or updated to cover all changes.
- [ ] Documentation is updated (e.g., README, inline comments, external docs).
Expand All @@ -10,32 +12,38 @@ Before submitting your PR, confirm the following:
---

## **Summary**

Provide a concise summary of this PR, including its purpose, the problem it solves, and the key changes made.

---

## **Change Type**

Select the type(s) of change included in this PR:

- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactor (non-breaking changes)
- [ ] Maintenance / Chores
- [ ] Breaking change
- [ ] Breaking change

If this PR introduces a breaking change, describe the impact and required migration steps:

---

## **Linked Issues**

List any related issues or feature requests (e.g., Fixes #123).

---

## **Screenshots/Logs (Optional)**

Include relevant screenshots, logs, or other visuals, if applicable.

---

## **Additional Notes**

Provide any additional information or feedback requests for reviewers.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build the app
run: yarn build
- name: Build the app
run: yarn build
11 changes: 5 additions & 6 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Close inactive issues
on:
schedule:
- cron: "0 0 * * *"
- cron: '0 0 * * *'

jobs:
close-issues:
Expand All @@ -10,14 +10,13 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9.0.0
- uses: actions/stale@v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
stale-issue-label: 'stale'
stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity.'
close-issue-message: 'This issue was closed because it has been inactive for 14 days since being marked as stale.'
days-before-pr-stale: -1
days-before-pr-close: -1

66 changes: 66 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Deploy to Vercel

on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy to'
required: true
default: 'Preview'
type: choice
options:
- Production
- Preview
tag:
description: 'Tag for the release (Production only). This will be ignored for Preview.'
required: true
default: '1.0.0'

permissions:
contents: write
actions: read

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Tag Release (Production Only)
if: ${{ inputs.environment == 'Production' }}
run: |
TAG=${{ inputs.tag }}
# Check if the tag already exists
if git tag -l "v$TAG" | grep -q "v$TAG"; then
echo "Error: Tag v$TAG already exists."
exit 1
fi
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git tag v$TAG
git push origin --tags

- name: Deploy to Vercel Production
if: ${{ inputs.environment == 'Production' }}
uses: amondnet/vercel-action@v25.2.0
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-version: 41
vercel-args: '--prod --yes'
working-directory: .
github-deployment: true

- name: Deploy to Vercel Preview
if: ${{ inputs.environment == 'Preview' }}
uses: amondnet/vercel-action@v25.2.0
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-version: 41
vercel-args: '--yes'
working-directory: .
github-deployment: true
17 changes: 17 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Add labels to issues and pull requests

on:
pull_request:
types: [opened]
issues:
types: [opened]

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Add labels to issues and pull requests
uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/config/labels.yml
22 changes: 22 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: '0 0 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Mark stale issues and pull requests
uses: actions/stale@v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.'
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.'
days-before-stale: 30
days-before-close: 7
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-issue-labels: 'enhancement,bug,help wanted'
exempt-pr-labels: 'wip'
Loading
Loading