Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 22, 2025

Description

Linting was only running in analysis.yml (SonarCloud) but not enforced as a blocking check in PR and merge workflows. Code could be merged despite linting failures.

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation update

Changes

Added lint job to both pr-open.yml and merge.yml:

  • Runs ESLint on backend and frontend in parallel (matrix strategy)
  • Blocks builds and deployments on linting failures
  • Uses Node 22 with npm caching
  • 5-minute timeout

.github/workflows/pr-open.yml:

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-24.04
    strategy:
      matrix:
        component: [backend, frontend]
    # ... runs npm ci && npm run lint

  builds:
    needs: [lint]  # Blocks on lint failure

.github/workflows/merge.yml:

jobs:
  lint:
    # ... identical to pr-open.yml

  deploy-test:
    needs: [lint]  # Blocks staging deployment on lint failure

Current ESLint config (TypeScript ESLint + Prettier) retained—no Airbnb config exists in codebase.

How Has This Been Tested?

  • No new tests are required
  • Manual tests (description below)

Verified linting passes locally for both backend and frontend. YAML syntax validated.

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments

Linting now runs before builds in PRs and before test deployment in staging, providing fast feedback on code quality issues.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/prisma/build/child {"product":"prisma","version":"6.18.0","cli_install_type":"local","information":"","local_timestamp":"2025-11-22T18:46:37Z","project_hash":"65cbeaa9","cli_path":"/home/REDACTED/work/quickstart-openshift/quickstart-openshift/backend/node_modules/.bin/prisma" (dns block)
  • scarf.sh
    • Triggering command: /usr/local/bin/node node ./report.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Enforce linting on staging and in PRs</issue_title>
<issue_description>This was working, but seems to have been clobbered. Likely when upgrading frontend and adding backend.

Airbnb linting standard is being used by Encora. Slight research needed to see if better options are available. </issue_description>

<agent_instructions>https://github.com/bcgov/copilot-instructions/blob/main/.github/copilot-upstream.md</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Nov 22, 2025
Copilot AI changed the title [WIP] Enforce linting on staging and in PRs Enforce linting on PRs and staging deployments Nov 22, 2025
Copilot AI requested a review from DerekRoberts November 22, 2025 18:53
@DerekRoberts
Copy link
Member

@copilot This is overly complex. Please add npm run lint to the existing npm testing jobs.

@github-project-automation github-project-automation bot moved this from New to Done in DevOps (NR) Nov 25, 2025
@DerekRoberts DerekRoberts deleted the copilot/enforce-linting-on-staging branch November 25, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Enforce linting on staging and in PRs

2 participants