Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 40 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2
updates:
# npm dependencies
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 10
labels:
- "security"
- "infra"
groups:
# Group minor/patch updates together to reduce PR noise
minor-and-patch:
update-types:
- "minor"
- "patch"

# GitHub Actions versions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
labels:
- "security"
- "infra"

# Docker base image
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 3
labels:
- "security"
- "infra"
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,71 @@ on:

permissions:
contents: read
pull-requests: write

jobs:
commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

- name: Validate commit messages
run: |
# Clean Commit convention pattern
# Format: <emoji> <type>[(<scope>)]: <description>
PATTERN='^(📦|🔧|🗑️|🔒|⚙️|☕|🧪|📖|🚀) (new|update|remove|security|setup|chore|test|docs|release)( \([a-z0-9][a-z0-9-]*\))?: .{1,72}$'

if [ "${{ github.event_name }}" = "pull_request" ]; then
COMMITS=$(git log --format="%s" "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}")
else
GITHUB_EVENT_BEFORE="${{ github.event.before }}"
GITHUB_EVENT_AFTER="${{ github.event.after }}"
if [ "$GITHUB_EVENT_BEFORE" = "0000000000000000000000000000000000000000" ]; then
# Initial push has no valid "before" SHA, so capture all reachable commits
COMMITS=$(git log --format="%s" "$GITHUB_EVENT_AFTER")
else
COMMITS=$(git log --format="%s" "${GITHUB_EVENT_BEFORE}..${GITHUB_EVENT_AFTER}")
fi
fi

FAILED=0
while IFS= read -r msg; do
[ -z "$msg" ] && continue
# Allow merge commits
if echo "$msg" | grep -qE "^Merge "; then
continue
fi
if ! echo "$msg" | grep -qP "$PATTERN"; then
echo "✖ Invalid commit message: $msg"
FAILED=1
else
echo "✔ Valid commit message: $msg"
fi
done <<< "$COMMITS"

if [ "$FAILED" -eq 1 ]; then
echo ""
echo "One or more commit messages do not follow the Clean Commit convention."
echo "Format: <emoji> <type>[(<scope>)]: <description>"
echo "Reference: https://github.com/wgtechlabs/clean-commit"
exit 1
fi

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- uses: oven-sh/setup-bun@v2

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

- name: Run Biome lint and format check
run: bun run lint

build:
runs-on: ubuntu-latest
steps:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CodeQL

on:
pull_request:
branches: [main, dev]
push:
branches: [main, dev]
schedule:
# Run every Monday at 6:00 UTC to catch new vulnerabilities
- cron: '0 6 * * 1'

permissions:
contents: read
security-events: write

jobs:
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['javascript-typescript']
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{ matrix.language }}'
61 changes: 0 additions & 61 deletions .github/workflows/commit-lint.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}

- name: Create Release
uses: wgtechlabs/release-build-flow-action@v1.6.0 # v1.6.0
Expand Down
38 changes: 38 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true,
"includes": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.json"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always"
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
Loading
Loading