Skip to content

Comments

Remove all CCR-specific code and tests#3502

Merged
mbg merged 3 commits intomainfrom
mbg/remove-ccr
Feb 24, 2026
Merged

Remove all CCR-specific code and tests#3502
mbg merged 3 commits intomainfrom
mbg/remove-ccr

Conversation

@mbg
Copy link
Member

@mbg mbg commented Feb 24, 2026

This is no longer needed.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Workflow types:

  • Managed - Impacts users with dynamic workflows (Default Setup, CCR, ...).

Products:

  • CCR - The changes impact analyses for Copilot Code Reviews.

Environments:

  • Dotcom - Impacts CodeQL workflows on github.com and/or GitHub Enterprise Cloud with Data Residency.
  • GHES - Impacts CodeQL workflows on GitHub Enterprise Server.
  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).
  • End-to-end tests - I am depending on PR checks (i.e. tests in pr-checks).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

How will you know if something goes wrong after this change is released?

  • Telemetry - I rely on existing telemetry or have made changes to the telemetry.
    • Dashboards - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release.
    • Alerts - New or existing monitors will trip if something goes wrong with this change.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@mbg mbg self-assigned this Feb 24, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 10:37
@mbg mbg requested a review from a team as a code owner February 24, 2026 10:37
@github-actions github-actions bot added the size/M Should be of average difficulty to review label Feb 24, 2026
Copy link
Contributor

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

Removes Copilot Code Review (CCR)-specific branching from the CodeQL Action and cleans up associated tests and PR-check infrastructure, aligning “managed/dynamic” workflow handling with the remaining supported modes.

Changes:

  • Delete CCR detection (isCCR) and related test helpers/tests.
  • Simplify feature-flag initialization to only use offline defaults when not running on GitHub.com (e.g., GHES), and adjust tests accordingly.
  • Remove CCR PR-check template/workflow and update the PR template wording to reflect current managed workflow products.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/testing-utils.ts Removes the CCR test helper (mockCCR) and its now-unused import.
src/feature-flags/offline-features.test.ts Updates offline-features test setup to simulate non-dotcom (GHES) instead of CCR.
src/feature-flags.ts Removes CCR-specific offline feature-flag path in initFeatures.
src/feature-flags.test.ts Removes the CCR-specific initFeatures test.
src/config-utils.ts Switches “ignore generated files” gating from CCR to dynamic workflows; updates comment (needs follow-up).
src/actions-util.ts Removes CCR detection and makes isDefaultSetup() equivalent to isDynamicWorkflow().
src/actions-util.test.ts Removes CCR test; leaves a now-misleading env var setup in the default-setup test (needs follow-up).
pr-checks/checks/ccr.yml Removes the CCR pr-check definition.
.github/workflows/__ccr.yml Removes generated CCR workflow (generated file; not reviewed).
.github/pull_request_template.md Updates risk assessment checklist/options to remove CCR references and add “Development/testing only”.
lib/*.js Generated output updates corresponding to src changes (not reviewed).

Comment on lines +967 to +973
// If we are in a dynamic workflow or the corresponding FF is enabled, try to determine
// which files in the repository are marked as generated and add them to
// the `paths-ignore` configuration.
if ((await features.getValue(Feature.IgnoreGeneratedFiles)) && isCCR()) {
if (
(await features.getValue(Feature.IgnoreGeneratedFiles)) &&
isDynamicWorkflow()
) {
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The comment says "in a dynamic workflow or the corresponding FF is enabled", but the condition actually requires both: IgnoreGeneratedFiles must be enabled and isDynamicWorkflow() must be true. Update the comment to match the logic (or adjust the condition if the intent really is an OR).

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is true, and I am pretty sure we had this on the PR that introduced it, and just like then I am not sure I want to re-run all CI for it 😆

Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

🫡

// the `paths-ignore` configuration.
if ((await features.getValue(Feature.IgnoreGeneratedFiles)) && isCCR()) {
if (
(await features.getValue(Feature.IgnoreGeneratedFiles)) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Change of behaviour, but should be safe since this FF isn't rolled out yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's not rolled out. We also know since merging that feature that it may be more widely useful, so it makes sense to widen the condition here while we are at it.

@mbg mbg merged commit c4dca28 into main Feb 24, 2026
248 checks passed
@mbg mbg deleted the mbg/remove-ccr branch February 24, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Should be of average difficulty to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants