Skip to content

Conversation

@mbg
Copy link
Member

@mbg mbg commented Jan 21, 2026

This PR changes the analyze action to tolerate

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.

How did/will you validate this change?

  • Test repository - This change will be tested on a test repository before merging.
  • 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.

@github-actions github-actions bot added the size/S Should be easy to review label Jan 21, 2026
@mbg mbg force-pushed the mbg/ccr/tolerate-no-files branch from 7aedbb5 to 5f4d056 Compare January 21, 2026 15:34

import ruamel.yaml
from ruamel.yaml.scalarstring import SingleQuotedScalarString
from ruamel.yaml.scalarstring import SingleQuotedScalarString, FoldedScalarString, LiteralScalarString

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'FoldedScalarString' is not used.

Copilot Autofix

AI about 7 hours ago

To fix the problem, remove the unused symbol from the import statement so that only actually used names are imported. This keeps the dependency on ruamel.yaml.scalarstring but avoids binding names that are never referenced.

Specifically, in pr-checks/sync.py, at the import on line 4, delete FoldedScalarString from the list of imported names. Leave the rest of the file unchanged. No new methods, imports, or definitions are required; we are only narrowing an existing import to the names that are (or may be) used: SingleQuotedScalarString and LiteralScalarString.

Suggested changeset 1
pr-checks/sync.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/pr-checks/sync.py b/pr-checks/sync.py
--- a/pr-checks/sync.py
+++ b/pr-checks/sync.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 import ruamel.yaml
-from ruamel.yaml.scalarstring import SingleQuotedScalarString, FoldedScalarString, LiteralScalarString
+from ruamel.yaml.scalarstring import SingleQuotedScalarString, LiteralScalarString
 import pathlib
 import os
 
EOF
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import ruamel.yaml
from ruamel.yaml.scalarstring import SingleQuotedScalarString, FoldedScalarString, LiteralScalarString
from ruamel.yaml.scalarstring import SingleQuotedScalarString, LiteralScalarString
import pathlib
import os

Copilot is powered by AI and may make mistakes. Always verify output.
@mbg mbg self-assigned this Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Should be easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants