Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: CodeQL config

paths-ignore:
- node_modules
- dist
- coverage
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2

updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
day: monday
timezone: America/Chicago
groups:
npm-minor-patch:
update-types: [minor, patch]
commit-message:
prefix: "deps(npm):"

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
timezone: America/Chicago
groups:
actions:
update-types: [minor, patch]
commit-message:
prefix: "deps(actions):"
31 changes: 31 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
adapters:
- changed-files:
- any-glob-to-any-file: src/adapters/**

inbound:
- changed-files:
- any-glob-to-any-file: src/inbound/**

outbound:
- changed-files:
- any-glob-to-any-file: src/outbound/**

tests:
- changed-files:
- any-glob-to-any-file: tests/**

ci:
- changed-files:
- any-glob-to-any-file: .github/**

docs:
- changed-files:
- any-glob-to-any-file:
- docs/**
- "*.md"

config:
- changed-files:
- any-glob-to-any-file:
- src/config*.ts
- openclaw.plugin.json
67 changes: 63 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,74 @@ on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
check:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: npm
- run: npm ci
Comment thread
jeremy marked this conversation as resolved.
- run: npm run typecheck

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run lint
- run: npm test
- name: actionlint
run: |
curl -sL "$(curl -sL https://api.github.com/repos/rhysd/actionlint/releases/latest \
| jq -r '.assets[] | select(.name | test("linux.*amd64.*tar\\.gz$")) | .browser_download_url')" \
| tar xz actionlint
./actionlint -color
Comment thread
jeremy marked this conversation as resolved.
Outdated
if: github.event_name == 'pull_request'

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm test -- --coverage
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: coverage
path: coverage/
if: always()

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
- name: Verify build output
run: |
test -f dist/index.js || { echo "dist/index.js missing"; exit 1; }
test -f dist/index.d.ts || { echo "dist/index.d.ts missing"; exit 1; }

dependency-review:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
continue-on-error: true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
26 changes: 26 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dependabot auto-merge

on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
id: meta
- name: Auto-approve and merge npm patch/minor updates
if: >-
steps.meta.outputs.package-ecosystem == 'npm_and_yarn' &&
(steps.meta.outputs.update-type == 'version-update:semver-patch' ||
steps.meta.outputs.update-type == 'version-update:semver-minor')
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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: Labeler

on:
pull_request_target:
types: [opened, synchronize]

permissions:
contents: read
pull-requests: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
with:
sync-labels: true
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Release

on:
push:
tags: ["v*"]

permissions:
contents: write
id-token: write

concurrency:
group: release
cancel-in-progress: false

jobs:
security:
uses: ./.github/workflows/security.yml
permissions:
contents: read
security-events: write

Comment thread
jeremy marked this conversation as resolved.
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: npm
- run: npm ci
Comment thread
jeremy marked this conversation as resolved.
- run: npm run typecheck
- run: npm run lint
- run: npm test
- run: npm run build
- name: Verify build output
run: |
test -f dist/index.js || { echo "dist/index.js missing"; exit 1; }
test -f dist/index.d.ts || { echo "dist/index.d.ts missing"; exit 1; }

publish:
needs: [security, test]
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
Comment thread
jeremy marked this conversation as resolved.
Outdated
cache: npm
registry-url: https://registry.npmjs.org
- name: Verify tag is on main
run: git merge-base --is-ancestor "$GITHUB_SHA" origin/main
Comment thread
jeremy marked this conversation as resolved.
Outdated
- name: Extract version from tag
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Check if version already published
id: check
run: |
if npm view "@37signals/openclaw-basecamp@${{ steps.version.outputs.version }}" version 2>/dev/null; then
Comment thread
jeremy marked this conversation as resolved.
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm ci
- run: npm run build
- name: Publish to npm
if: steps.check.outputs.exists == 'false'
run: |
TAG_FLAG=""
if [[ "${{ steps.version.outputs.version }}" == *-* ]]; then
TAG_FLAG="--tag next"
fi
npm publish --provenance $TAG_FLAG
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
generate_release_notes: true
prerelease: ${{ contains(steps.version.outputs.version, '-') }}
66 changes: 66 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Security

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 6 * * 1" # Monday 6am UTC
workflow_call:

permissions:
contents: read
security-events: write

jobs:
npm-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
Comment thread
jeremy marked this conversation as resolved.
Outdated
cache: npm
- run: npm ci
- run: npm audit --audit-level=high

trivy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # 0.35.0
with:
scan-type: fs
severity: HIGH,CRITICAL
ignore-unfixed: true
format: sarif
output: trivy-results.sarif
- uses: github/codeql-action/upload-sarif@820e3160e279568db735cee8ed8f8e77a6da7818 # v3
with:
sarif_file: trivy-results.sarif
if: always()
continue-on-error: true

codeql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: github/codeql-action/init@820e3160e279568db735cee8ed8f8e77a6da7818 # v3
with:
languages: javascript
queries: security-and-quality
config-file: .github/codeql/codeql-config.yml
- uses: github/codeql-action/analyze@820e3160e279568db735cee8ed8f8e77a6da7818 # v3
continue-on-error: true

gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2.3.9
env:
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
continue-on-error: true
Comment thread
jeremy marked this conversation as resolved.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules/
dist/
coverage/
*.tsbuildinfo
.env
.env.*
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
Loading
Loading