Skip to content

fix: redact GitLab token from debug/warn logs in auth context #913

fix: redact GitLab token from debug/warn logs in auth context

fix: redact GitLab token from debug/warn logs in auth context #913

Workflow file for this run

name: PR Test and Validation
on:
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened]
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.21.1'
cache: 'npm'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build project
run: npm run build
- name: Check runtime dependencies
run: npm run check:runtime-deps
- name: Run consumer install smoke test
run: npm run test:consumer-smoke
- name: Run mock tests
run: npm run test:mock
- name: Type check
run: npx tsc --noEmit
- name: Lint check
run: npm run lint || echo "No lint script found"
- name: Check package size
run: |
npm pack --dry-run --ignore-scripts
echo "Package created successfully"
- name: Security audit
run: npm audit --production || echo "Some vulnerabilities found"
continue-on-error: true
integration-test:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Test Docker build
run: |
docker build -t mcp-gitlab-test .
echo "Verifying Docker image contains built files..."
docker run --rm --entrypoint "" mcp-gitlab-test ls -la build/index.js
echo "Docker build verification passed"
code-quality:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.21.1'
cache: 'npm'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Check code formatting
run: |
npx prettier --check "**/*.{js,ts,json,md}" || echo "Some files need formatting"
- name: Check for console.log statements
run: |
if grep -r "console\.log" --include="*.ts" --exclude-dir=node_modules --exclude-dir=build --exclude="test*.ts" .; then
echo "Warning: Found console.log statements in source code"
else
echo "No console.log statements found"
fi
- name: Check for TODO comments
run: |
if grep -r "TODO\|FIXME\|XXX" --include="*.ts" --exclude-dir=node_modules --exclude-dir=build .; then
echo "Warning: Found TODO/FIXME comments"
else
echo "No TODO/FIXME comments found"
fi
docs-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
# actions/checkout@v4 — pin to commit SHA for supply-chain safety
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
# Drop the GITHUB_TOKEN credential after checkout; this job only
# needs read access to the working tree.
persist-credentials: false
- name: Setup Node.js
# actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '22.21.1'
cache: 'npm'
- name: Install Node dependencies
run: npm ci --ignore-scripts
- name: Regenerate tool docs
run: npx tsx scripts/generate-tool-docs.ts
- name: Check for tool-docs drift
run: |
if ! git diff --exit-code -- docs/tools/ || [ -n "$(git ls-files --others --exclude-standard -- docs/tools/)" ]; then
echo "::error::docs/tools/ is out of sync with tools/registry.ts. Run 'make tools-docs' and commit the result."
git status --porcelain -- docs/tools/
exit 1
fi
- name: Check skill catalog sync
run: npm run check:skill-sync
- name: Set up Python
# actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-docs.txt
- name: Install docs dependencies
run: pip install -r requirements-docs.txt
- name: Build site (strict)
run: mkdocs build --strict