Initial commit

This commit is contained in:
Aditya Gupta
2026-06-29 19:29:19 +05:30
committed by GitHub
commit aabb8986aa
292 changed files with 17976 additions and 0 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @Jonghakseo

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
github: Jonghakseo

75
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
name: Bug Report
description: Create a bug report.
title: "[Bug]: "
labels: [ "bug", "triage" ]
assignees:
- Jonghakseo
body:
- type: textarea
id: to-reproduce
attributes:
label: To Reproduce
description: |
Steps to reproduce the behavior.
Use [Brie](https://go.briehq.com/github?utm_source=CEB) to capture screenshots, errors, and network activity for faster issue resolution.
placeholder: Describe the steps to reproduce the issue.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
placeholder: Describe the expected behavior.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
- type: dropdown
id: desktop-os
attributes:
label: OS
description: Select your operating system.
options: [ Windows, macOS, Linux ]
default: 0
validations:
required: true
- type: dropdown
id: desktop-browser
attributes:
label: Browser
description: Select the browser where the issue occurs(Multiple choice).
multiple: true
options: [ Chrome, Opera, Opera GX, Firefox, Safari, Microsoft Edge, Brave ]
default: 0
validations:
required: true
- type: input
id: desktop-node-version
attributes:
label: Node Version
description: Specify the Node.js version you are using.
placeholder: 22.12.0
- type: input
id: desktop-other-packages
attributes:
label: Other Necessary Packages Version
description: Specify versions of other necessary packages.
placeholder: pnpm-10.10.0
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context about the problem here.
placeholder: Provide additional details if necessary.

7
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
contact_links:
- name: GitHub Community Support
url: https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite/discussions
about: Please leave your questions here or on Discord - Link below "Security Bug Bounty"
- name: GitHub Security Bug Bounty
url: https://discord.gg/RhETcmdW
about: Please report security vulnerabilities here(Send DM to Jonghakseo or tell us on chat, you want to report it).

View File

@@ -0,0 +1,39 @@
name: Feature Request
description: Suggest an idea for improvement.
title: "[Feature Request]: "
labels: [ "request-new-feature", "triage" ]
assignees:
- Jonghakseo
body:
- type: textarea
id: problem-description
attributes:
label: Problem Description
description: A clear and concise description of what's the problem. Ex. I'm looking for a way to...
placeholder: Describe the problem or frustration.
validations:
required: true
- type: textarea
id: proposed-solution
attributes:
label: Proposed Solution
description: A clear and concise description of what you want to happen.
placeholder: Describe the solution you'd like.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: A clear and concise description of any alternative solutions.
placeholder: Describe alternative solutions or features.
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context or screenshots about the feature request here.
placeholder: Provide additional details if necessary.

10
.github/auto_assign.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
addReviewers: true
reviewers:
- Jonghakseo
addAssignees: author
filterLabels:
exclude:
- dependencies

25
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: "npm"
target-branch: 'dev'
directory: "/"
schedule:
interval: "daily"
labels:
- "dependencies"
- "npm"
groups:
dev-dependencies:
dependency-type: development
dependencies:
dependency-type: production
versioning-strategy: increase
- package-ecosystem: "github-actions"
target-branch: 'dev'
directory: "/"
schedule:
interval: "daily"
labels:
- "dependencies"
- "github-actions"

25
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,25 @@
<!-- Note: Please ensure your PR is targeting the `dev` branch -->
<!-- Describe what this PR is for in the title. -->
> `*` denotes required fields
## Priority*
- [ ] High: This PR needs to be merged first, before other tasks.
- [x] Medium: This PR should be merged quickly to prevent conflicts due to common changes. (default)
- [ ] Low: This PR does not affect other tasks, so it can be merged later.
## Purpose of the PR*
<!-- Describe the purpose of the PR. -->
## Changes*
## How to check the feature
<!-- Describe how to check the feature in detail -->
<!-- If there are any visual changes, please attach a screenshot for easy identification. -->
## Reference
<!-- Any helpful information for understanding the PR. -->

2
.github/secret_scanning.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
paths-ignore:
- "../pnpm-lock.yaml"

21
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90
# Number of days of inactivity before a stale Issue or Pull Request is closed
daysUntilClose: 30
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
# Label to use when marking as stale
staleLabel: stale
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label. Set to `false` to disable
unmarkComment: false
# Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable
closeComment: true
# Limit to only `issues` or `pulls`
only: issues

View File

@@ -0,0 +1,24 @@
name: Make sure new PRs are sent to development
on:
pull_request_target:
types: [ opened ]
jobs:
check-branch:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: Vankka/pr-target-branch-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target: main
exclude: dev
change-to: dev
comment: |
Your PR's base branch was set to `main`, PRs should be set to target `dev`.
The base branch of this PR has been automatically changed to `dev`, please check that there are no merge conflicts.
already-exists-action: close_this
already-exists-comment: "Closing, because {url} basing on the same branch"

19
.github/workflows/build-zip.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Build And Upload Extension Zip Via Artifact
on: [ pull_request_target ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: pnpm
- run: pnpm install --frozen-lockfile --prefer-offline
- run: pnpm build
- uses: actions/upload-artifact@v4
with:
path: dist/*

View File

@@ -0,0 +1,42 @@
name: Cancel PR workflows on close
on:
pull_request_target:
types: [ closed ]
jobs:
cancel:
runs-on: ubuntu-latest
permissions:
actions: write
if: ${{ github.event.pull_request.merged == false }}
steps:
- name: Cancel all queued/in_progress workflows for this PR
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
run: |
owner="${GITHUB_REPOSITORY%%/*}"
repo="${GITHUB_REPOSITORY##*/}"
branch="$BRANCH"
token="${{ secrets.GITHUB_TOKEN }}"
runs=$(curl -s -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $token" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$owner/$repo/actions/runs?branch=$branch&status=queued" | jq -r '.workflow_runs[].id')
runs+=" "
runs+=$(curl -s -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $token" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$owner/$repo/actions/runs?branch=$branch&status=in_progress" | jq -r '.workflow_runs[].id')
for run_id in $runs; do
if [ -n "$run_id" ]; then
echo "Cancelling workflow run: $run_id"
curl -s -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $token" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$owner/$repo/actions/runs/$run_id/cancel"
fi
done

40
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: "CodeQL Advanced"
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
schedule:
- cron: '40 18 * * 0'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
security-events: write
packages: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -0,0 +1,30 @@
name: Dependabot Pull Request Approve and Merge
on: pull_request_target
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for Dependabot PRs
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

71
.github/workflows/e2e-modular.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
name: Modular E2E Tests Matrix
on: [ pull_request_target ]
permissions:
contents: read
env:
ALL_SCENARIOS: '["content", "content-ui", "content-runtime", "background", "new-tab", "popup", "devtools", "side-panel", "options"]'
jobs:
e2e-tests:
name: '${{ matrix.browser }} | Scenario: ${{ matrix.scenario }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: ['chrome', 'firefox']
scenario: ['content', 'content-ui', 'content-runtime', 'background', 'new-tab', 'popup', 'devtools', 'side-panel', 'options']
env:
CEB_CI: true
CURRENT_SCENARIO: ${{ matrix.scenario }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: pnpm
- run: pnpm install --frozen-lockfile --prefer-offline
- name: Configure modules | scenario "${{ matrix.scenario }}"
run: |
echo "Deleting all features except '${{ matrix.scenario }}'"
pnpm module-manager --de ${{ matrix.scenario }} tests
- name: Run E2E tests (${{ matrix.browser }})
run: pnpm e2e${{ matrix.browser == 'firefox' && ':firefox' || '' }}
- name: Restore one random feature and re-run E2E tests
run: |
echo "ALL_SCENARIOS=$ALL_SCENARIOS"
echo "CURRENT_SCENARIO=$CURRENT_SCENARIO"
scenarios=($(echo "$ALL_SCENARIOS" | jq -r '.[]'))
# Filter out current scenario
filtered_scenarios=()
for scenario in "${scenarios[@]}"; do
if [ "$scenario" != "$CURRENT_SCENARIO" ]; then
filtered_scenarios+=("$scenario")
fi
done
if [ ${#filtered_scenarios[@]} -eq 0 ]; then
echo "::warning::No other scenario available, skipping restoration."
exit 0
fi
random_feature="${filtered_scenarios[$RANDOM % ${#filtered_scenarios[@]}]}"
echo "Restoring feature: $random_feature"
pnpm module-manager -r "$random_feature"
- name: Run again E2E tests (${{ matrix.browser }})
run: pnpm ${{ matrix.browser == 'chrome' && 'e2e' || 'e2e:firefox' }}

25
.github/workflows/e2e.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Run E2E Tests
on: [ pull_request_target ]
permissions:
contents: read
jobs:
e2e:
name: E2E tests on ${{ matrix.browser }}
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chrome, firefox]
env:
CEB_CI: true
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: pnpm
- run: pnpm install --frozen-lockfile --prefer-offline
- run: pnpm ${{ matrix.browser == 'chrome' && 'e2e' || 'e2e:firefox' }}

16
.github/workflows/greetings.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: Greetings
on: [ pull_request_target, issues ]
jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thank you for your contribution. We will check and reply to you as soon as possible.'
pr-message: 'Thank you for your contribution. We will check and reply to you as soon as possible.'

17
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Lint Check
on: [ pull_request_target ]
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: pnpm
- run: pnpm install --frozen-lockfile --prefer-offline
- run: pnpm lint

25
.github/workflows/prettier.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Formating validation
on: [ pull_request_target ]
jobs:
prettier:
name: Prettier Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run Prettier
id: prettier-run
uses: rutajdash/prettier-cli-action@v1.0.2
with:
config_path: ./.prettierrc
file_pattern: "*.{js,jsx,ts,tsx,json}"
- name: Prettier Output
if: ${{ failure() }}
shell: bash
run: |
echo "The following files aren't formatted properly:"
echo "${{steps.prettier-run.outputs.prettier_output}}"