Skip to content

Add repository hygiene and automated releases#23

Open
Copilot wants to merge 4 commits intomainfrom
copilot/add-repository-hygiene-releases
Open

Add repository hygiene and automated releases#23
Copilot wants to merge 4 commits intomainfrom
copilot/add-repository-hygiene-releases

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 8, 2026

Description

Implements comprehensive CI/CD automation with ecosystem-aware workflows, automated releases via conventional commits, security scanning, and dependency management.

Type of Change

  • 🔨 Build/CI updates
  • 📚 Documentation update

Changes Made

Workflows

  • Enhanced CI (.github/workflows/ci.yml)

    • dorny/paths-filter@v3 for ecosystem detection (Node.js/Python/Docker)
    • Conditional jobs: Node (lint/test/build + npm cache), Python (ruff/mypy/pytest + pip cache), Docker builds
    • continue-on-error: true for compatibility with existing codebase
  • Release Please (.github/workflows/release-please.yml)

    • Manifest mode with conventional commits
    • Auto-generates CHANGELOG.md and GitHub Releases on main
  • CodeQL (.github/workflows/codeql.yml)

    • JavaScript/TypeScript + Python security analysis
    • Weekly scheduled scans with security-extended queries
  • Auto-labeler (.github/workflows/labeler.yml)

    • PR labeling by path (frontend/backend/python/docs/infra/tests/dependencies)

Configuration

  • Dependabot (.github/dependabot.yml): Weekly updates for npm (root/backend/frontend), pip (python-service), github-actions
  • CODEOWNERS: @lippytm ownership
  • Release Please: release-please-config.json + .release-please-manifest.json (v2.0.0)
  • Python: pyproject.toml with ruff config (lenient for existing code)

Documentation

  • CONTRIBUTING.md: Branch/PR process, conventional commits guide, lint/test/build commands
  • README.md: CI/CD overview, Release Please usage, Dependabot/CodeQL info

Testing

  • All YAML/JSON validated
  • Ruff passes on Python code
  • npm lint tested
  • Workflows conditional and safe
  • No breaking changes

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Additional Context

Conditional execution pattern: Each ecosystem CI job checks for file existence before running (package.json for Node, requirements*.txt/pyproject.toml for Python, Dockerfile for Docker). Jobs pass gracefully if files missing.

Release Please usage: Merge PRs with conventional commits (feat:, fix:, docs:) to main. Release Please creates release PR with auto-generated CHANGELOG, determines semantic version, and creates GitHub Release on merge.

Original prompt

Add repository hygiene and automated releases on top of the starter work.

Workflows:

  • .github/workflows/ci.yml: use dorny/paths-filter to detect ecosystems; run conditionally:
    • Node/Next: if package.json present, set up node, npm ci, npm run lint --if-present, npm test --if-present, npm run build --if-present, cache npm.
    • Python: if pyproject.toml or requirements*.txt present, set up Python 3.11, pip install -r requirements*.txt if present, install ruff mypy pytest, run ruff check ., mypy . (if pyproject present) and pytest (allow tests to be absent by marking success if no tests collected). Cache pip.
    • Docker: if Dockerfile present, docker build .
  • .github/workflows/release-please.yml: release-please manifest mode. Add release-please-config.json with { "manifest": true, "packages": { ".": { "release-type": "simple" } } } to generate CHANGELOG.md, tags, GitHub Releases on pushes to main and manual dispatch.
  • .github/workflows/codeql.yml: enable CodeQL for languages javascript/typescript and python.
  • Dependabot: .github/dependabot.yml for npm, pip, github-actions weekly.

Templates & repo hygiene:

  • .github/ISSUE_TEMPLATE/bug_report.md and feature_request.md; .github/pull_request_template.md.
  • .github/CODEOWNERS placeholder (use @lippytm for now).
  • .github/labeler.yml to auto-label based on paths (frontend/backend/docs/infra/tests).
  • CONTRIBUTING.md outlining branch/PR process, conventional commits optional but recommended for release-please, how to run lint/test/build.
  • Update README with CI/release overview and how to use release-please (conventional commits), and note Dependabot/CodeQL.
  • Add .env.example placeholder for common vars (API keys, DB URL) without secrets; ensure .gitignore includes .env.

Keep changes minimal and safe if code is absent: workflows must be conditional so CI passes even if ecosystem files are missing. Target base branch main. Provide a clear PR summary and testing notes.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 8, 2026 20:09
…flows

Co-authored-by: lippytm <65956507+lippytm@users.noreply.github.com>
Co-authored-by: lippytm <65956507+lippytm@users.noreply.github.com>
Copilot AI changed the title [WIP] Add repository hygiene and automated release workflows Add repository hygiene and automated releases Jan 8, 2026
Copilot AI requested a review from lippytm January 8, 2026 20:23
Copy link
Copy Markdown
Owner

@lippytm lippytm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what to look for

@lippytm lippytm requested a review from Copilot February 22, 2026 23:19
@lippytm lippytm marked this pull request as ready for review February 22, 2026 23:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds repository “hygiene” automation (CI, security scanning, dependency management) and automated release tooling via Release Please, plus contributor/docs updates to reflect the new workflows.

Changes:

  • Introduces ecosystem-aware CI (Node/Python/Docker) and supporting security/dependency checks.
  • Adds automated release configuration using Release Please manifest mode.
  • Adds repo management configuration (CodeQL, Dependabot, CODEOWNERS, labeler) and updates docs (README/CONTRIBUTING).

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.github/workflows/ci.yml Adds paths-filter-based detection and conditional Node/Python/Docker jobs, plus Trivy + dependency review.
.github/workflows/release-please.yml Adds Release Please workflow for automated releases.
release-please-config.json Configures Release Please in manifest mode with a simple release type.
.release-please-manifest.json Seeds manifest version for the root package.
.github/workflows/codeql.yml Adds CodeQL scanning workflow for JS/Python.
.github/workflows/labeler.yml Adds PR label automation workflow.
.github/labeler.yml Defines label rules based on path globs.
.github/dependabot.yml Enables weekly Dependabot updates for npm/pip/actions.
.github/CODEOWNERS Sets default ownership and path-based owners.
pyproject.toml Adds Ruff configuration for Python linting.
README.md Documents CI/CD, releases, and security/dependency automation.
CONTRIBUTING.md Adds contribution process details and local lint/test/build guidance.
package-lock.json Updates lockfile to reflect dependency/script changes (e.g., concurrently) and version bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines +128 to +135
- name: Install requirements
if: steps.check-python.outputs.exists == 'true'
run: |
if ls requirements*.txt 1> /dev/null 2>&1; then
for req in requirements*.txt; do
pip install -r "$req"
done
fi
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python CI installs only root-level requirements*.txt, but this repo’s dependencies live in python-service/requirements.txt, so the job can run without installing the service dependencies. Update the install step to also install python-service/requirements.txt (and/or run installs from the service directory).

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
python-version: '3.11'
cache: 'pip'
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions/setup-python pip caching won’t be effective unless you point it at the dependency file(s) used by the job. Consider setting cache-dependency-path to include python-service/requirements.txt (and any other requirements files you install).

Suggested change
cache: 'pip'
cache: 'pip'
cache-dependency-path: |
pyproject.toml
requirements*.txt

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +74 to +90
- name: Install dependencies
if: steps.check-package.outputs.exists == 'true'
run: npm ci

- name: Run linter
if: steps.check-package.outputs.exists == 'true'
run: npm run lint --if-present
continue-on-error: true

- name: Run tests
if: steps.check-package.outputs.exists == 'true'
run: npm test --if-present
continue-on-error: true

- name: Run backend tests
run: cd backend && npm test
- name: Build project
if: steps.check-package.outputs.exists == 'true'
run: npm run build --if-present
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This job only runs npm ci at the repo root, but the root build script invokes backend and frontend builds that rely on their own node_modules. Unless you’re using workspaces, you’ll need to install dependencies in backend/ and frontend/ (or run npm run install:all) before running build/test steps that execute in those directories.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
exit 1
fi
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using aquasecurity/trivy-action@master makes builds non-reproducible and increases supply-chain risk. Pin this to a released tag or (preferably) a commit SHA so the workflow behavior can’t change unexpectedly.

Suggested change
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@v0.20.0

Copilot uses AI. Check for mistakes.
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow is intended for Release Please manifest mode (per release-please-config.json), but the action invocation doesn’t specify the manifest command. Configure the action to run the manifest workflow (and optionally set explicit config/manifest file paths) so it creates the release PR and tags/releases as expected.

Suggested change
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
command: manifest
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +154 to +159
pytest || exit_code=$?
if [ $exit_code -eq 5 ]; then
echo "No tests collected, marking as success"
exit 0
elif [ $exit_code -ne 0 ]; then
exit $exit_code
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pytest || exit_code=$? pattern leaves exit_code unset on success, and the subsequent numeric comparisons (-eq, -ne) will error. Capture the exit code unconditionally (e.g., initialize exit_code=0 before running pytest, or assign exit_code=$? immediately after) before branching on 0/5/other.

Suggested change
pytest || exit_code=$?
if [ $exit_code -eq 5 ]; then
echo "No tests collected, marking as success"
exit 0
elif [ $exit_code -ne 0 ]; then
exit $exit_code
pytest
exit_code=$?
if [ "$exit_code" -eq 5 ]; then
echo "No tests collected, marking as success"
exit 0
elif [ "$exit_code" -ne 0 ]; then
exit "$exit_code"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants