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
22 changes: 22 additions & 0 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Auto Approve

on:
pull_request_target:
types:
- opened
- synchronize
- reopened

jobs:
auto-approve:
runs-on: ubuntu-latest
if: |
(github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.user.login == 'renovate[bot]' ||
github.event.pull_request.user.login == 'github-actions[bot]' ||
contains(github.event.pull_request.labels.*.name, 'auto-approve'))
steps:
- name: Approve PR
uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.GH_BOT_TOKEN || secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Auto Merge

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}

jobs:
auto-merge:
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft == false &&
(github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.user.login == 'renovate[bot]' ||
github.event.pull_request.user.login == 'github-actions[bot]' ||
contains(github.event.pull_request.labels.*.name, 'auto-merge'))
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_BOT_TOKEN || secrets.GITHUB_TOKEN }}

- name: Enable auto-merge for bot PRs
run: |
gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN || secrets.GITHUB_TOKEN }}
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint || npm run eslint || echo "No linter configured"

- name: Run tests
run: npm test || npm run test:ci || echo "No tests configured"

- name: Build
run: npm run build || echo "No build step configured"

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run npm audit
run: npm audit || true

- name: Run Snyk Security Scan
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
52 changes: 52 additions & 0 deletions .github/workflows/dependency-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Dependency Update

on:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday
workflow_dispatch:

jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_BOT_TOKEN || secrets.GITHUB_TOKEN }}

- name: Update npm dependencies
if: hashFiles('package.json') != ''
run: |
npm update
npm audit fix || true

- name: Update Python dependencies
if: hashFiles('requirements.txt') != ''
run: |
pip install --upgrade pip
pip install -r requirements.txt --upgrade

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_BOT_TOKEN || secrets.GITHUB_TOKEN }}
commit-message: 'chore: update dependencies'
title: 'chore: update dependencies'
body: |
## 🤖 Automated Dependency Update

This PR updates all dependencies to their latest versions.

### Changes
- Updated npm dependencies (if applicable)
- Updated Python dependencies (if applicable)
- Fixed security vulnerabilities

---
*This PR was automatically generated by GitHub Actions*
branch: automated/dependency-update
delete-branch: true
labels: |
dependencies
auto-merge
auto-approve
Loading