generated from nhcarrigan/template
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6634a5bf09 | |||
| b2654a3421 | |||
| 12afb3fdc2 | |||
| db73741d19 | |||
| 7c1a41990a | |||
| 6459620b64 | |||
| 2a8f9bd7ae | |||
| f11b8273c2 | |||
| 9c0d38f61a | |||
| 7ebb556d1b | |||
| bfe7f682c0 | |||
| 24e3793eec | |||
| 61ecc80e9a | |||
| 2c46672a81 | |||
| 0387262581 | |||
| efa6028b4c | |||
| d56d5dcbfc | |||
| efaf3dce16 | |||
| 0441f1c68a | |||
| fa1d627178 | |||
| c0b21ce82f | |||
| 8121f3bb6d | |||
| a632f2b924 | |||
| 5a8e56d188 |
+13
-4
@@ -8,23 +8,32 @@ on:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint and Test
|
||||
ci:
|
||||
name: CI
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Files
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js v22
|
||||
- name: Use Node.js v24
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
node-version: 24
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Ensure Dependencies are Pinned
|
||||
uses: naomi-lgbt/dependency-pin-check@main
|
||||
with:
|
||||
language: javascript
|
||||
dev-dependencies: true
|
||||
peer-dependencies: true
|
||||
optional-dependencies: true
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
name: Security Scan and Upload
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '0 0 * * 1'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
security-audit:
|
||||
name: Security & DefectDojo Upload
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# --- AUTO-SETUP PROJECT ---
|
||||
- name: Ensure DefectDojo Product Exists
|
||||
env:
|
||||
DD_URL: ${{ secrets.DD_URL }}
|
||||
DD_TOKEN: ${{ secrets.DD_TOKEN }}
|
||||
PRODUCT_NAME: ${{ github.repository }}
|
||||
PRODUCT_TYPE_ID: 1
|
||||
run: |
|
||||
sudo apt-get install jq -y > /dev/null
|
||||
|
||||
echo "Checking connection to $DD_URL..."
|
||||
|
||||
# Check if product exists - capture HTTP code to debug connection issues
|
||||
RESPONSE=$(curl --write-out "%{http_code}" --silent --output /tmp/response.json \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
"$DD_URL/api/v2/products/?name=$PRODUCT_NAME")
|
||||
|
||||
# If response is not 200, print error
|
||||
if [ "$RESPONSE" != "200" ]; then
|
||||
echo "::error::Failed to query DefectDojo. HTTP Code: $RESPONSE"
|
||||
cat /tmp/response.json
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COUNT=$(cat /tmp/response.json | jq -r '.count')
|
||||
|
||||
if [ "$COUNT" = "0" ]; then
|
||||
echo "Creating product '$PRODUCT_NAME'..."
|
||||
curl -s -X POST "$DD_URL/api/v2/products/" \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{ "name": "'"$PRODUCT_NAME"'", "description": "Auto-created by Gitea Actions", "prod_type": '$PRODUCT_TYPE_ID' }'
|
||||
else
|
||||
echo "Product '$PRODUCT_NAME' already exists."
|
||||
fi
|
||||
|
||||
# --- 1. TRIVY (Dependencies & Misconfig) ---
|
||||
- name: Install Trivy
|
||||
run: |
|
||||
sudo apt-get install wget apt-transport-https gnupg lsb-release -y
|
||||
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
|
||||
echo "deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
|
||||
sudo apt-get update && sudo apt-get install trivy -y
|
||||
|
||||
- name: Run Trivy (FS Scan)
|
||||
run: |
|
||||
trivy fs . --scanners vuln,misconfig --format json --output trivy-results.json --exit-code 0
|
||||
|
||||
- name: Upload Trivy to DefectDojo
|
||||
env:
|
||||
DD_URL: ${{ secrets.DD_URL }}
|
||||
DD_TOKEN: ${{ secrets.DD_TOKEN }}
|
||||
run: |
|
||||
echo "Uploading Trivy results..."
|
||||
# Generate today's date in YYYY-MM-DD format
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
HTTP_CODE=$(curl --write-out "%{http_code}" --output response.txt --silent -X POST "$DD_URL/api/v2/import-scan/" \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
-F "active=true" \
|
||||
-F "verified=true" \
|
||||
-F "scan_type=Trivy Scan" \
|
||||
-F "engagement_name=CI/CD Pipeline" \
|
||||
-F "product_name=${{ github.repository }}" \
|
||||
-F "scan_date=$TODAY" \
|
||||
-F "auto_create_context=true" \
|
||||
-F "file=@trivy-results.json")
|
||||
|
||||
if [[ "$HTTP_CODE" != "200" && "$HTTP_CODE" != "201" ]]; then
|
||||
echo "::error::Upload Failed with HTTP $HTTP_CODE"
|
||||
echo "--- SERVER RESPONSE ---"
|
||||
cat response.txt
|
||||
echo "-----------------------"
|
||||
exit 1
|
||||
else
|
||||
echo "Upload Success!"
|
||||
fi
|
||||
|
||||
# --- 2. GITLEAKS (Secrets) ---
|
||||
- name: Install Gitleaks
|
||||
run: |
|
||||
wget -qO gitleaks.tar.gz https://github.com/gitleaks/gitleaks/releases/download/v8.18.0/gitleaks_8.18.0_linux_x64.tar.gz
|
||||
tar -xzf gitleaks.tar.gz
|
||||
sudo mv gitleaks /usr/local/bin/ && chmod +x /usr/local/bin/gitleaks
|
||||
|
||||
- name: Run Gitleaks
|
||||
run: gitleaks detect --source . -v --report-path gitleaks-results.json --report-format json --no-git || true
|
||||
|
||||
- name: Upload Gitleaks to DefectDojo
|
||||
env:
|
||||
DD_URL: ${{ secrets.DD_URL }}
|
||||
DD_TOKEN: ${{ secrets.DD_TOKEN }}
|
||||
run: |
|
||||
echo "Uploading Gitleaks results..."
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
HTTP_CODE=$(curl --write-out "%{http_code}" --output response.txt --silent -X POST "$DD_URL/api/v2/import-scan/" \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
-F "active=true" \
|
||||
-F "verified=true" \
|
||||
-F "scan_type=Gitleaks Scan" \
|
||||
-F "engagement_name=CI/CD Pipeline" \
|
||||
-F "product_name=${{ github.repository }}" \
|
||||
-F "scan_date=$TODAY" \
|
||||
-F "auto_create_context=true" \
|
||||
-F "file=@gitleaks-results.json")
|
||||
|
||||
if [[ "$HTTP_CODE" != "200" && "$HTTP_CODE" != "201" ]]; then
|
||||
echo "::error::Upload Failed with HTTP $HTTP_CODE"
|
||||
echo "--- SERVER RESPONSE ---"
|
||||
cat response.txt
|
||||
echo "-----------------------"
|
||||
exit 1
|
||||
else
|
||||
echo "Upload Success!"
|
||||
fi
|
||||
|
||||
# --- 3. SEMGREP (SAST) ---
|
||||
- name: Install Semgrep (via pipx)
|
||||
run: |
|
||||
sudo apt-get install pipx -y
|
||||
pipx install semgrep
|
||||
# Add pipx binary path to GITHUB_PATH so next steps can see 'semgrep'
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run Semgrep
|
||||
run: semgrep scan --config=p/security-audit --config=p/owasp-top-ten --json --output semgrep-results.json . || true
|
||||
|
||||
- name: Upload Semgrep to DefectDojo
|
||||
env:
|
||||
DD_URL: ${{ secrets.DD_URL }}
|
||||
DD_TOKEN: ${{ secrets.DD_TOKEN }}
|
||||
run: |
|
||||
echo "Uploading Semgrep results..."
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
HTTP_CODE=$(curl --write-out "%{http_code}" --output response.txt --silent -X POST "$DD_URL/api/v2/import-scan/" \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
-F "active=true" \
|
||||
-F "verified=true" \
|
||||
-F "scan_type=Semgrep JSON Report" \
|
||||
-F "engagement_name=CI/CD Pipeline" \
|
||||
-F "product_name=${{ github.repository }}" \
|
||||
-F "scan_date=$TODAY" \
|
||||
-F "auto_create_context=true" \
|
||||
-F "file=@semgrep-results.json")
|
||||
|
||||
if [[ "$HTTP_CODE" != "200" && "$HTTP_CODE" != "201" ]]; then
|
||||
echo "::error::Upload Failed with HTTP $HTTP_CODE"
|
||||
echo "--- SERVER RESPONSE ---"
|
||||
cat response.txt
|
||||
echo "-----------------------"
|
||||
exit 1
|
||||
else
|
||||
echo "Upload Success!"
|
||||
fi
|
||||
@@ -1,34 +0,0 @@
|
||||
name: Code Analysis
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sonar:
|
||||
name: SonarQube
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Files
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: SonarCube Scan
|
||||
uses: SonarSource/sonarqube-scan-action@v4
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: "https://quality.nhcarrigan.com"
|
||||
with:
|
||||
args: >
|
||||
-Dsonar.sources=.
|
||||
-Dsonar.projectKey=standup-bot
|
||||
|
||||
- name: SonarQube Quality Gate check
|
||||
uses: sonarsource/sonarqube-quality-gate-action@v1
|
||||
with:
|
||||
pollingTimeoutSec: 600
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: "https://quality.nhcarrigan.com"
|
||||
@@ -0,0 +1,25 @@
|
||||
# Package Manager Configuration
|
||||
# Force pnpm usage - breaks npm/yarn intentionally
|
||||
node-linker=pnpm
|
||||
|
||||
# Security: Disable all lifecycle scripts
|
||||
ignore-scripts=true
|
||||
enable-pre-post-scripts=false
|
||||
|
||||
# Security: Require packages to be 10+ days old before installation
|
||||
minimum-release-age=14400
|
||||
|
||||
# Security: Verify package integrity hashes
|
||||
verify-store-integrity=true
|
||||
|
||||
# Security: Enforce strict trust policies
|
||||
trust-policy=strict
|
||||
|
||||
# Security: Strict peer dependency resolution
|
||||
strict-peer-dependencies=true
|
||||
|
||||
# Performance: Use symlinks for node_modules
|
||||
symlink=true
|
||||
|
||||
# Lockfile: Ensure lockfile is not modified during install
|
||||
frozen-lockfile=false
|
||||
@@ -18,7 +18,7 @@ This page is currently deployed. [View the live website.]
|
||||
|
||||
## Feedback and Bugs
|
||||
|
||||
If you have feedback or a bug report, please feel free to open a GitHub issue!
|
||||
If you have feedback or a bug report, please [log a ticket on our forum](https://support.nhcarrigan.com).
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
"devDependencies": {
|
||||
"@nhcarrigan/eslint-config": "5.2.0",
|
||||
"@nhcarrigan/typescript-config": "4.0.0",
|
||||
"@types/node": "24.0.6",
|
||||
"@types/node": "25.2.3",
|
||||
"@types/node-schedule": "2.1.7",
|
||||
"@vitest/coverage-istanbul": "3.2.4",
|
||||
"eslint": "9.30.0",
|
||||
|
||||
Generated
+42
-32
@@ -20,19 +20,19 @@ importers:
|
||||
devDependencies:
|
||||
'@nhcarrigan/eslint-config':
|
||||
specifier: 5.2.0
|
||||
version: 5.2.0(@typescript-eslint/utils@8.25.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(playwright@1.50.1)(react@19.0.0)(typescript@5.8.3)(vitest@3.2.4(@types/node@24.0.6))
|
||||
version: 5.2.0(@typescript-eslint/utils@8.25.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(playwright@1.50.1)(react@19.0.0)(typescript@5.8.3)(vitest@3.2.4(@types/node@25.2.3))
|
||||
'@nhcarrigan/typescript-config':
|
||||
specifier: 4.0.0
|
||||
version: 4.0.0(typescript@5.8.3)
|
||||
'@types/node':
|
||||
specifier: 24.0.6
|
||||
version: 24.0.6
|
||||
specifier: 25.2.3
|
||||
version: 25.2.3
|
||||
'@types/node-schedule':
|
||||
specifier: 2.1.7
|
||||
version: 2.1.7
|
||||
'@vitest/coverage-istanbul':
|
||||
specifier: 3.2.4
|
||||
version: 3.2.4(vitest@3.2.4(@types/node@24.0.6))
|
||||
version: 3.2.4(vitest@3.2.4(@types/node@25.2.3))
|
||||
eslint:
|
||||
specifier: 9.30.0
|
||||
version: 9.30.0
|
||||
@@ -41,7 +41,7 @@ importers:
|
||||
version: 5.8.3
|
||||
vitest:
|
||||
specifier: 3.2.4
|
||||
version: 3.2.4(@types/node@24.0.6)
|
||||
version: 3.2.4(@types/node@25.2.3)
|
||||
|
||||
packages:
|
||||
|
||||
@@ -478,51 +478,61 @@ packages:
|
||||
resolution: {integrity: sha512-A4iphFGNkWRd+5m3VIGuqHnG3MVnqKe7Al57u9mwgbyZ2/xF9Jio72MaY7xxh+Y87VAHmGQr73qoKL9HPbXj1g==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm-musleabihf@4.34.8':
|
||||
resolution: {integrity: sha512-S0lqKLfTm5u+QTxlFiAnb2J/2dgQqRy/XvziPtDd1rKZFXHTyYLoVL58M/XFwDI01AQCDIevGLbQrMAtdyanpA==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-arm64-gnu@4.34.8':
|
||||
resolution: {integrity: sha512-jpz9YOuPiSkL4G4pqKrus0pn9aYwpImGkosRKwNi+sJSkz+WU3anZe6hi73StLOQdfXYXC7hUfsQlTnjMd3s1A==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm64-musl@4.34.8':
|
||||
resolution: {integrity: sha512-KdSfaROOUJXgTVxJNAZ3KwkRc5nggDk+06P6lgi1HLv1hskgvxHUKZ4xtwHkVYJ1Rep4GNo+uEfycCRRxht7+Q==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-loongarch64-gnu@4.34.8':
|
||||
resolution: {integrity: sha512-NyF4gcxwkMFRjgXBM6g2lkT58OWztZvw5KkV2K0qqSnUEqCVcqdh2jN4gQrTn/YUpAcNKyFHfoOZEer9nwo6uQ==}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-powerpc64le-gnu@4.34.8':
|
||||
resolution: {integrity: sha512-LMJc999GkhGvktHU85zNTDImZVUCJ1z/MbAJTnviiWmmjyckP5aQsHtcujMjpNdMZPT2rQEDBlJfubhs3jsMfw==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-riscv64-gnu@4.34.8':
|
||||
resolution: {integrity: sha512-xAQCAHPj8nJq1PI3z8CIZzXuXCstquz7cIOL73HHdXiRcKk8Ywwqtx2wrIy23EcTn4aZ2fLJNBB8d0tQENPCmw==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-s390x-gnu@4.34.8':
|
||||
resolution: {integrity: sha512-DdePVk1NDEuc3fOe3dPPTb+rjMtuFw89gw6gVWxQFAuEqqSdDKnrwzZHrUYdac7A7dXl9Q2Vflxpme15gUWQFA==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-gnu@4.34.8':
|
||||
resolution: {integrity: sha512-8y7ED8gjxITUltTUEJLQdgpbPh1sUQ0kMTmufRF/Ns5tI9TNMNlhWtmPKKHCU0SilX+3MJkZ0zERYYGIVBYHIA==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-musl@4.34.8':
|
||||
resolution: {integrity: sha512-SCXcP0ZpGFIe7Ge+McxY5zKxiEI5ra+GT3QRxL0pMMtxPfpyLAKleZODi1zdRHkz5/BhueUrYtYVgubqe9JBNQ==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-win32-arm64-msvc@4.34.8':
|
||||
resolution: {integrity: sha512-YHYsgzZgFJzTRbth4h7Or0m5O74Yda+hLin0irAIobkLQFRQd1qWmnoVfwmKm9TXIZVAD0nZ+GEb2ICicLyCnQ==}
|
||||
@@ -578,8 +588,8 @@ packages:
|
||||
'@types/node-schedule@2.1.7':
|
||||
resolution: {integrity: sha512-G7Z3R9H7r3TowoH6D2pkzUHPhcJrDF4Jz1JOQ80AX0K2DWTHoN9VC94XzFAPNMdbW9TBzMZ3LjpFi7RYdbxtXA==}
|
||||
|
||||
'@types/node@24.0.6':
|
||||
resolution: {integrity: sha512-ZOyn+gOs749xU7ovp+Ibj0g1o3dFRqsfPnT22C2t5JzcRvgsEDpGawPbCISGKLudJk9Y0wiu9sYd6kUh0pc9TA==}
|
||||
'@types/node@25.2.3':
|
||||
resolution: {integrity: sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ==}
|
||||
|
||||
'@types/normalize-package-data@2.4.4':
|
||||
resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}
|
||||
@@ -2153,8 +2163,8 @@ packages:
|
||||
resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
undici-types@7.8.0:
|
||||
resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==}
|
||||
undici-types@7.16.0:
|
||||
resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==}
|
||||
|
||||
undici@6.21.3:
|
||||
resolution: {integrity: sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==}
|
||||
@@ -2650,7 +2660,7 @@ snapshots:
|
||||
'@jridgewell/resolve-uri': 3.1.2
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
|
||||
'@nhcarrigan/eslint-config@5.2.0(@typescript-eslint/utils@8.25.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(playwright@1.50.1)(react@19.0.0)(typescript@5.8.3)(vitest@3.2.4(@types/node@24.0.6))':
|
||||
'@nhcarrigan/eslint-config@5.2.0(@typescript-eslint/utils@8.25.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(playwright@1.50.1)(react@19.0.0)(typescript@5.8.3)(vitest@3.2.4(@types/node@25.2.3))':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-plugin-eslint-comments': 4.4.1(eslint@9.30.0)
|
||||
'@eslint/compat': 1.2.4(eslint@9.30.0)
|
||||
@@ -2659,7 +2669,7 @@ snapshots:
|
||||
'@stylistic/eslint-plugin': 2.12.1(eslint@9.30.0)(typescript@5.8.3)
|
||||
'@typescript-eslint/eslint-plugin': 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(typescript@5.8.3)
|
||||
'@typescript-eslint/parser': 8.19.0(eslint@9.30.0)(typescript@5.8.3)
|
||||
'@vitest/eslint-plugin': 1.1.24(@typescript-eslint/utils@8.25.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(typescript@5.8.3)(vitest@3.2.4(@types/node@24.0.6))
|
||||
'@vitest/eslint-plugin': 1.1.24(@typescript-eslint/utils@8.25.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(typescript@5.8.3)(vitest@3.2.4(@types/node@25.2.3))
|
||||
eslint: 9.30.0
|
||||
eslint-plugin-deprecation: 3.0.0(eslint@9.30.0)(typescript@5.8.3)
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)
|
||||
@@ -2672,7 +2682,7 @@ snapshots:
|
||||
playwright: 1.50.1
|
||||
react: 19.0.0
|
||||
typescript: 5.8.3
|
||||
vitest: 3.2.4(@types/node@24.0.6)
|
||||
vitest: 3.2.4(@types/node@25.2.3)
|
||||
transitivePeerDependencies:
|
||||
- '@typescript-eslint/utils'
|
||||
- eslint-import-resolver-typescript
|
||||
@@ -2796,17 +2806,17 @@ snapshots:
|
||||
|
||||
'@types/node-schedule@2.1.7':
|
||||
dependencies:
|
||||
'@types/node': 24.0.6
|
||||
'@types/node': 25.2.3
|
||||
|
||||
'@types/node@24.0.6':
|
||||
'@types/node@25.2.3':
|
||||
dependencies:
|
||||
undici-types: 7.8.0
|
||||
undici-types: 7.16.0
|
||||
|
||||
'@types/normalize-package-data@2.4.4': {}
|
||||
|
||||
'@types/ws@8.5.14':
|
||||
dependencies:
|
||||
'@types/node': 24.0.6
|
||||
'@types/node': 25.2.3
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(typescript@5.8.3)':
|
||||
dependencies:
|
||||
@@ -2960,7 +2970,7 @@ snapshots:
|
||||
'@typescript-eslint/types': 8.25.0
|
||||
eslint-visitor-keys: 4.2.0
|
||||
|
||||
'@vitest/coverage-istanbul@3.2.4(vitest@3.2.4(@types/node@24.0.6))':
|
||||
'@vitest/coverage-istanbul@3.2.4(vitest@3.2.4(@types/node@25.2.3))':
|
||||
dependencies:
|
||||
'@istanbuljs/schema': 0.1.3
|
||||
debug: 4.4.1
|
||||
@@ -2972,17 +2982,17 @@ snapshots:
|
||||
magicast: 0.3.5
|
||||
test-exclude: 7.0.1
|
||||
tinyrainbow: 2.0.0
|
||||
vitest: 3.2.4(@types/node@24.0.6)
|
||||
vitest: 3.2.4(@types/node@25.2.3)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@vitest/eslint-plugin@1.1.24(@typescript-eslint/utils@8.25.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(typescript@5.8.3)(vitest@3.2.4(@types/node@24.0.6))':
|
||||
'@vitest/eslint-plugin@1.1.24(@typescript-eslint/utils@8.25.0(eslint@9.30.0)(typescript@5.8.3))(eslint@9.30.0)(typescript@5.8.3)(vitest@3.2.4(@types/node@25.2.3))':
|
||||
dependencies:
|
||||
'@typescript-eslint/utils': 8.25.0(eslint@9.30.0)(typescript@5.8.3)
|
||||
eslint: 9.30.0
|
||||
optionalDependencies:
|
||||
typescript: 5.8.3
|
||||
vitest: 3.2.4(@types/node@24.0.6)
|
||||
vitest: 3.2.4(@types/node@25.2.3)
|
||||
|
||||
'@vitest/expect@3.2.4':
|
||||
dependencies:
|
||||
@@ -2992,13 +3002,13 @@ snapshots:
|
||||
chai: 5.2.0
|
||||
tinyrainbow: 2.0.0
|
||||
|
||||
'@vitest/mocker@3.2.4(vite@6.2.0(@types/node@24.0.6))':
|
||||
'@vitest/mocker@3.2.4(vite@6.2.0(@types/node@25.2.3))':
|
||||
dependencies:
|
||||
'@vitest/spy': 3.2.4
|
||||
estree-walker: 3.0.3
|
||||
magic-string: 0.30.17
|
||||
optionalDependencies:
|
||||
vite: 6.2.0(@types/node@24.0.6)
|
||||
vite: 6.2.0(@types/node@25.2.3)
|
||||
|
||||
'@vitest/pretty-format@3.2.4':
|
||||
dependencies:
|
||||
@@ -4705,7 +4715,7 @@ snapshots:
|
||||
has-symbols: 1.1.0
|
||||
which-boxed-primitive: 1.1.1
|
||||
|
||||
undici-types@7.8.0: {}
|
||||
undici-types@7.16.0: {}
|
||||
|
||||
undici@6.21.3: {}
|
||||
|
||||
@@ -4724,13 +4734,13 @@ snapshots:
|
||||
spdx-correct: 3.2.0
|
||||
spdx-expression-parse: 3.0.1
|
||||
|
||||
vite-node@3.2.4(@types/node@24.0.6):
|
||||
vite-node@3.2.4(@types/node@25.2.3):
|
||||
dependencies:
|
||||
cac: 6.7.14
|
||||
debug: 4.4.1
|
||||
es-module-lexer: 1.7.0
|
||||
pathe: 2.0.3
|
||||
vite: 6.2.0(@types/node@24.0.6)
|
||||
vite: 6.2.0(@types/node@25.2.3)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- jiti
|
||||
@@ -4745,20 +4755,20 @@ snapshots:
|
||||
- tsx
|
||||
- yaml
|
||||
|
||||
vite@6.2.0(@types/node@24.0.6):
|
||||
vite@6.2.0(@types/node@25.2.3):
|
||||
dependencies:
|
||||
esbuild: 0.25.0
|
||||
postcss: 8.5.3
|
||||
rollup: 4.34.8
|
||||
optionalDependencies:
|
||||
'@types/node': 24.0.6
|
||||
'@types/node': 25.2.3
|
||||
fsevents: 2.3.3
|
||||
|
||||
vitest@3.2.4(@types/node@24.0.6):
|
||||
vitest@3.2.4(@types/node@25.2.3):
|
||||
dependencies:
|
||||
'@types/chai': 5.2.2
|
||||
'@vitest/expect': 3.2.4
|
||||
'@vitest/mocker': 3.2.4(vite@6.2.0(@types/node@24.0.6))
|
||||
'@vitest/mocker': 3.2.4(vite@6.2.0(@types/node@25.2.3))
|
||||
'@vitest/pretty-format': 3.2.4
|
||||
'@vitest/runner': 3.2.4
|
||||
'@vitest/snapshot': 3.2.4
|
||||
@@ -4776,11 +4786,11 @@ snapshots:
|
||||
tinyglobby: 0.2.14
|
||||
tinypool: 1.1.1
|
||||
tinyrainbow: 2.0.0
|
||||
vite: 6.2.0(@types/node@24.0.6)
|
||||
vite-node: 3.2.4(@types/node@24.0.6)
|
||||
vite: 6.2.0(@types/node@25.2.3)
|
||||
vite-node: 3.2.4(@types/node@25.2.3)
|
||||
why-is-node-running: 2.3.0
|
||||
optionalDependencies:
|
||||
'@types/node': 24.0.6
|
||||
'@types/node': 25.2.3
|
||||
transitivePeerDependencies:
|
||||
- jiti
|
||||
- less
|
||||
|
||||
+18
-103
@@ -4,112 +4,27 @@
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
/**
|
||||
* The channels to post standup reminders in.
|
||||
*/
|
||||
export const channels: Array<{
|
||||
interface Channel {
|
||||
channelId: string;
|
||||
roleId: string;
|
||||
name: string;
|
||||
}> = [
|
||||
}
|
||||
|
||||
const nhcarriganMentorshipChannels: Array<Channel> = [
|
||||
{
|
||||
channelId: "1382093555228606484",
|
||||
name: "red-script",
|
||||
roleId: "1382091453987029144",
|
||||
},
|
||||
{
|
||||
channelId: "1382093583963656223",
|
||||
name: "orange-bytes",
|
||||
roleId: "1382091462707122186",
|
||||
},
|
||||
{
|
||||
channelId: "1382093618017337574",
|
||||
name: "yellow-packet",
|
||||
roleId: "1382091466767208538",
|
||||
},
|
||||
{
|
||||
channelId: "1382093654885138439",
|
||||
name: "green-loop",
|
||||
roleId: "1382091470877491364",
|
||||
},
|
||||
{
|
||||
channelId: "1382093684925005935",
|
||||
name: "blue-stack",
|
||||
roleId: "1382091474560356393",
|
||||
},
|
||||
{
|
||||
channelId: "1382093724200210522",
|
||||
name: "purple-array",
|
||||
roleId: "1382091477710012456",
|
||||
},
|
||||
{
|
||||
channelId: "1382093753489162330",
|
||||
name: "pink-protocol",
|
||||
roleId: "1382091502255341568",
|
||||
},
|
||||
{
|
||||
channelId: "1382093785973915820",
|
||||
name: "cyan-branch",
|
||||
roleId: "1382091520533856337",
|
||||
},
|
||||
{
|
||||
channelId: "1382093811693387867",
|
||||
name: "teal-cache",
|
||||
roleId: "1382091525873336400",
|
||||
},
|
||||
{
|
||||
channelId: "1382093843918225520",
|
||||
name: "mint-syntax",
|
||||
roleId: "1382091530428219603",
|
||||
},
|
||||
{
|
||||
channelId: "1382093883722174605",
|
||||
name: "lime-variable",
|
||||
roleId: "1382091534538641458",
|
||||
},
|
||||
{
|
||||
channelId: "1382093910259798046",
|
||||
name: "rose-token",
|
||||
roleId: "1382091538900979762",
|
||||
},
|
||||
{
|
||||
channelId: "1382093973488799886",
|
||||
name: "lavender-query",
|
||||
roleId: "1382091542961066014",
|
||||
},
|
||||
{
|
||||
channelId: "1382094002526097489",
|
||||
name: "indigo-class",
|
||||
roleId: "1382091547742568559",
|
||||
},
|
||||
{
|
||||
channelId: "1382094051360116837",
|
||||
name: "golden-index",
|
||||
roleId: "1382091551982882936",
|
||||
},
|
||||
{
|
||||
channelId: "1382094088739754096",
|
||||
name: "silver-promise",
|
||||
roleId: "1382091556613394443",
|
||||
},
|
||||
{
|
||||
channelId: "1382094114467745912",
|
||||
name: "bronze-thread",
|
||||
roleId: "1382091560367292536",
|
||||
},
|
||||
{
|
||||
channelId: "1382094146206044181",
|
||||
name: "maroon-socket",
|
||||
roleId: "1382091564498681907",
|
||||
},
|
||||
{
|
||||
channelId: "1382094200211771522",
|
||||
name: "violet-function",
|
||||
roleId: "1382091568252719205",
|
||||
},
|
||||
{
|
||||
channelId: "1382094311264616670",
|
||||
name: "grey-database",
|
||||
roleId: "1382091572602212622",
|
||||
channelId: "1400630073010163792",
|
||||
name: "accountability",
|
||||
roleId: "1400588705273745550",
|
||||
},
|
||||
];
|
||||
const freeCodeCampHackathonChannels: Array<Channel> = [];
|
||||
const dallasSoftwareDevelopersCohortChannels: Array<Channel> = [];
|
||||
|
||||
/**
|
||||
* The channels to post standup reminders in.
|
||||
*/
|
||||
export const channels: Array<Channel> = [
|
||||
...freeCodeCampHackathonChannels,
|
||||
...dallasSoftwareDevelopersCohortChannels,
|
||||
...nhcarriganMentorshipChannels,
|
||||
];
|
||||
|
||||
+13
-1
@@ -38,7 +38,8 @@ client.on(Events.ClientReady, () => {
|
||||
});
|
||||
});
|
||||
|
||||
client.on(Events.MessageCreate, (message) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises -- sod off this is going away next month.
|
||||
client.on(Events.MessageCreate, async(message) => {
|
||||
if (!message.channel.isThread() || !message.inGuild()) {
|
||||
return;
|
||||
}
|
||||
@@ -54,8 +55,19 @@ client.on(Events.MessageCreate, (message) => {
|
||||
if (message.author.bot) {
|
||||
return;
|
||||
}
|
||||
const threadOwner = await message.channel.fetchOwner();
|
||||
// Check if thread owner is Maribelle (to indicate it is progress thread)
|
||||
if (threadOwner?.id !== "1386862413936328796") {
|
||||
return;
|
||||
}
|
||||
if (!activeIds.includes(message.author.id)) {
|
||||
activeIds.push(message.author.id);
|
||||
await message.channel.send({
|
||||
allowedMentions: {
|
||||
parse: [],
|
||||
},
|
||||
content: `-# Thank you for your progress update, <@${message.author.id}>! Your participation for today has been recorded.`,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -66,17 +66,19 @@ export const standup = async(
|
||||
await Promise.all(
|
||||
filtered.map(async(channel) => {
|
||||
const sent = await channel.
|
||||
send(
|
||||
send({ allowedMentions: {
|
||||
parse: [ "roles" ],
|
||||
},
|
||||
content:
|
||||
`Good morning <@&${
|
||||
channels.find((c) => {
|
||||
return c.channelId === channel.id;
|
||||
})?.roleId ?? "692816967895220344"
|
||||
})?.roleId ?? channel.guildId
|
||||
}> It is time for your daily progress update. Please share the following in this thread:
|
||||
|
||||
1️⃣ What did you accomplish yesterday?
|
||||
2️⃣ What are you working on today?
|
||||
3️⃣ Are there any blockers or issues you need help with?`,
|
||||
).
|
||||
3️⃣ Are there any blockers or issues you need help with?` }).
|
||||
catch(() => {
|
||||
void logger.log(
|
||||
"warn",
|
||||
|
||||
Reference in New Issue
Block a user