Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c5b84dd
Initial plan
Copilot Oct 2, 2025
74d228a
Initial plan
Copilot Oct 2, 2025
bc7fe6e
Phase 1: Update package.json, add .npmrc, generate pnpm-lock.yaml, fi…
Copilot Oct 2, 2025
52ce6b5
Initial plan
Copilot Oct 2, 2025
0f40ad8
feat: install ESLint with security plugins and fix linting issues
Copilot Oct 2, 2025
05ec3e4
feat: add VSCode ESLint integration settings
Copilot Oct 2, 2025
aeaf272
feat: integrate ESLint with GitHub Actions and documentation
Copilot Oct 2, 2025
f9fc456
Phase 2: Update Dockerfile to use pnpm instead of yarn
Copilot Oct 2, 2025
eb3f3c7
Add comprehensive dev container configuration with pnpm and GitHub Co…
Copilot Oct 2, 2025
0d50825
docs: add comprehensive ESLint documentation and fix lint scripts
Copilot Oct 2, 2025
7e7c0ce
Phase 3 & 4: Update CI/CD workflows and documentation for pnpm
Copilot Oct 2, 2025
00fac44
Initial plan
Copilot Oct 2, 2025
ca738de
Improve dev container configuration for better reliability
Copilot Oct 2, 2025
e3ff851
Add comprehensive setup script for dev container with Redis CLI support
Copilot Oct 2, 2025
c09511f
Update .gitignore to reflect pnpm usage and ignore npm/yarn lock files
Copilot Oct 2, 2025
7f6afd9
Add Vitest setup with configuration and example test
Copilot Oct 2, 2025
4aa33c9
Add comprehensive testing documentation and update guides
Copilot Oct 2, 2025
4f84a01
Add test integration to CI/CD workflows
Copilot Oct 2, 2025
fa3c2a0
Fix GitHub Actions workflow - setup pnpm before Node.js for proper ca…
Copilot Oct 2, 2025
8ade4a2
✨ tweak: update pnpm version to 9.15.4
warengonzaga Oct 3, 2025
9a52c61
✨ tweak: migrate from yarn to pnpm package manager
warengonzaga Oct 3, 2025
c73f674
Initial plan
Copilot Nov 18, 2025
b14478d
feat: migrate to container-build-flow-action for automated builds
Copilot Nov 18, 2025
bf8643e
fix: add explicit permissions to build workflow for security
Copilot Nov 18, 2025
b92bdaa
Merge pull request #19 from wgtechlabs/copilot/migrate-to-container-b…
warengonzaga Nov 22, 2025
3798c17
fix: update container-build-flow-action version from @v1 to @v1.0.0
warengonzaga Nov 25, 2025
a7ba114
fix: temporarily disable pr-comment due to action output formatting i…
warengonzaga Nov 25, 2025
64df4d5
✨ tweak: update the action version and enabled the comment feature
warengonzaga Nov 25, 2025
3af8f52
✨ tweak: update pnpm version
warengonzaga Nov 25, 2025
ca94ec2
✨ tweak: reorder imports
warengonzaga Nov 25, 2025
a330a62
Merge pull request #16 from wgtechlabs/copilot/fix-02a62285-6cc8-4134…
warengonzaga Dec 9, 2025
d761cd7
☕ chore: remove dev container files
warengonzaga Dec 9, 2025
068be69
Merge branch 'dev' into copilot/fix-2f50d303-2814-4614-bbb9-3d384f318448
warengonzaga Dec 9, 2025
0fe6ce5
☕ chore: update linting commands
warengonzaga Dec 9, 2025
3116b13
🐛 fix: fix validate action
warengonzaga Dec 9, 2025
8e297c7
☕ chore: update lock file
warengonzaga Dec 9, 2025
e33f92e
Merge pull request #15 from wgtechlabs/copilot/fix-2f50d303-2814-4614…
warengonzaga Dec 9, 2025
d4bc6d8
Merge dev branch and update to pnpm
Copilot Dec 9, 2025
720719c
Update documentation to use pnpm and update lockfile with Vitest depe…
Copilot Dec 9, 2025
0e36721
Fix ESLint configuration to exclude test files and Vitest config
Copilot Dec 9, 2025
43a3527
Fix validate.yml workflow to use pnpm instead of yarn for test commands
Copilot Dec 9, 2025
ac12ca9
🐛 fix: validate.yml workflow
warengonzaga Dec 9, 2025
62f5303
Merge branch 'copilot/fix-40e7d887-8f6e-4881-bdcf-6e44d546638b' of gi…
warengonzaga Dec 9, 2025
a6523b3
Merge pull request #17 from wgtechlabs/copilot/fix-40e7d887-8f6e-4881…
warengonzaga Dec 9, 2025
9146551
☕ chore: remove devcontainer config
warengonzaga Dec 9, 2025
2db40fd
🐛 fix: validate workflow and eslint
warengonzaga Dec 9, 2025
ef0c2f5
🐛 fix: error handling in processing
warengonzaga Dec 9, 2025
34c6e18
☕ chore: update container build action
warengonzaga Dec 9, 2025
3f96464
☕ chore: snyk rules
warengonzaga Dec 10, 2025
e38c43f
☕ chore: update container build action
warengonzaga Dec 10, 2025
af6df3c
☕ chore: update node version to 22
warengonzaga Dec 10, 2025
12b4b70
☕ chore: update docs node version to 22
warengonzaga Dec 10, 2025
395ac50
☕ chore: update testing instructions
warengonzaga Dec 10, 2025
971989f
🚀 trigger: test pr comment with v1.0.3
warengonzaga Dec 10, 2025
243c7ae
☕ chore: update container build action
warengonzaga Dec 10, 2025
7667b6a
☕ chore: update eslint config links
warengonzaga Dec 10, 2025
d9f930a
Merge branch 'main' into dev
warengonzaga Dec 10, 2025
5478988
☕ chore: update readme for enhancements
warengonzaga Dec 10, 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
114 changes: 65 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,90 @@
name: Build

on:
pull_request:
branches: [dev, main]
push:
branches: [dev]

env:
REGISTRY_DOCKERHUB: wgtechlabs/unthread-webhook-server
REGISTRY_GHCR: ghcr.io/wgtechlabs/unthread-webhook-server

jobs:
build-dev:
name: Build Development Images
test:
name: Run Tests
runs-on: ubuntu-latest

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

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
version: 9.15.4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
node-version: '22'
cache: 'pnpm'

- name: Extract metadata
id: meta
run: |
echo "short_sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT

- name: Build and push development images
uses: docker/build-push-action@v5
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Type checking
run: pnpm type-check

- name: Run tests
run: pnpm test

- name: Generate coverage
run: pnpm test:coverage
continue-on-error: true

build:
name: Build Container Images
runs-on: ubuntu-latest
needs: test
permissions:
contents: read
packages: write
pull-requests: write

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

- name: Build and Push Container
uses: wgtechlabs/[email protected]
with:
# Registry Configuration
registry: both
dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

# Branch Configuration
main-branch: main
dev-branch: dev

# Image Configuration
image-name: unthread-webhook-server
dockerfile: ./Dockerfile
context: .
push: true
platforms: linux/amd64
tags: |
${{ env.REGISTRY_DOCKERHUB }}:dev
${{ env.REGISTRY_DOCKERHUB }}:dev-${{ steps.meta.outputs.short_sha }}
${{ env.REGISTRY_GHCR }}:dev
${{ env.REGISTRY_GHCR }}:dev-${{ steps.meta.outputs.short_sha }}

# Build Arguments
build-args: |
NODE_VERSION=22.21-alpine3.23
RAILWAY_SERVICE_ID=${{ secrets.RAILWAY_SERVICE_ID }}

# Labels
labels: |
org.opencontainers.image.title=Unthread Webhook Server
org.opencontainers.image.description=A reliable, production-ready Node.js server for processing Unthread.io webhooks with signature verification and smart platform handling.
org.opencontainers.image.version=dev-${{ steps.meta.outputs.short_sha }}
org.opencontainers.image.created=${{ steps.meta.outputs.build_date }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
cache-from: type=gha
cache-to: type=gha,mode=max
org.opencontainers.image.url=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.licenses=GPL-3.0

- name: Development build summary
run: |
echo "## 🔨 Development Build Complete" >> $GITHUB_STEP_SUMMARY
echo "**Images built and pushed:**" >> $GITHUB_STEP_SUMMARY
echo "- \`${{ env.REGISTRY_DOCKERHUB }}:dev\`" >> $GITHUB_STEP_SUMMARY
echo "- \`${{ env.REGISTRY_DOCKERHUB }}:dev-${{ steps.meta.outputs.short_sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "- \`${{ env.REGISTRY_GHCR }}:dev\`" >> $GITHUB_STEP_SUMMARY
echo "- \`${{ env.REGISTRY_GHCR }}:dev-${{ steps.meta.outputs.short_sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Test the dev image:**" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
echo "docker pull ${{ env.REGISTRY_DOCKERHUB }}:dev" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
# Features
pr-comment-enabled: true
cache-enabled: true
provenance: true
sbom: true
22 changes: 17 additions & 5 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,32 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
node-version: '22'
cache: 'pnpm'

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

- name: Type checking
run: yarn type-check
run: pnpm type-check

- name: Run tests
run: pnpm test

- name: Generate coverage
run: pnpm test:coverage
continue-on-error: true

- name: Build TypeScript
run: yarn build
run: pnpm build

- name: Test Docker build (no push)
run: |
Expand Down
17 changes: 13 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ pids
coverage/
*.lcov

# Test artifacts
.vitest/
test-results/

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

Expand Down Expand Up @@ -113,8 +117,10 @@ node_modules
# Users Environment Variables
.lock-wscript

# IDEs and editors (shim for help)
.vscode/
# IDEs and editors
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
.idea/
*.swp
*.swo
Expand All @@ -132,8 +138,9 @@ Thumbs.db
docs/
ai_context/

# Enforce Yarn usage - ignore npm lockfile
# Enforce pnpm usage - ignore npm and yarn lockfiles
package-lock.json
yarn.lock

# Environment files with sensitive data
.env
Expand All @@ -142,4 +149,6 @@ package-lock.json
.env.production

# Context folder
context/
context/
# Snyk Security Extension - AI Rules (auto-generated)
.github/instructions/snyk_rules.instructions.md
13 changes: 13 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# pnpm configuration
# Use shamefully-hoist to make peer dependencies available
# This resolves TypeScript type inference issues with nested dependencies
shamefully-hoist=true

# Public hoist pattern - hoist @redis packages to resolve TypeScript type issues
public-hoist-pattern[]=@redis/*

# Auto-install peers to prevent missing peer dependency warnings
auto-install-peers=true

# Disable strict peer dependency checking to allow auto-install-peers to resolve mismatches
strict-peer-dependencies=false
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"vitest.explorer",
"bierner.markdown-preview-github-styles",
"bierner.github-markdown-preview",
"bierner.markdown-shiki",
"bierner.color-info",
"oderwat.indent-rainbow",
"warengonzaga.bini-theme",
"warengonzaga.bini-theme"
]
}
28 changes: 28 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": [
"javascript",
"typescript"
],
"eslint.workingDirectories": [
{
"mode": "auto"
}
],
"eslint.lintTask.enable": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"vitest.enable": true,
"vitest.commandLine": "pnpm test:watch",
"python-envs.defaultEnvManager": "ms-python.python:system",
"python-envs.pythonProjects": []
}
4 changes: 0 additions & 4 deletions .yarnrc

This file was deleted.

Loading
Loading