GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Convert `sync_back.py` to TypeScript by mbg · Pull Request #3529 · github/codeql-action

Conversation

@mbg

@mbg mbg commented Mar 1, 2026

Copy link
Copy Markdown
Member

Follow-up (and based on) #3526.

This PR converts sync_back.py and test_sync_back.py to TypeScript equivalents.

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?

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • Other - Please provide details.

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

  • Development/testing only - This change cannot cause any failures in production.

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

  • Other - Please provide details.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mbg added 6 commits March 1, 2026 16:04
@mbg
Add initial sync_back.ts script
6a6bd77
@mbg
Add scanGeneratedWorkflows
e1b83cc
@mbg
Add updateSyncTs
f05cfae
@mbg
Add updateTemplateFiles
dd779fa
@mbg
Port tests
8eb0202
@mbg
Use sync_back.ts in rebuild workflow
a6892dc
@mbg mbg self-assigned this Mar 1, 2026
@github-actions github-actions Bot added the size/L May be hard to review label Mar 1, 2026
@mbg mbg mentioned this pull request Mar 1, 2026
Convert sync.py to TypeScript #3526
Merged
@mbg
mbg marked this pull request as ready for review March 3, 2026 10:50
@mbg
mbg requested a review from a team as a code owner March 3, 2026 10:50
Copilot AI review requested due to automatic review settings March 3, 2026 10:50
Copilot started reviewing on behalf of mbg March 3, 2026 10:51
View session
Copilot AI reviewed Mar 3, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a TypeScript implementation of the sync_back utility used by PR checks tooling, and updates the rebuild workflow to use the new TS script when syncing Dependabot action-version updates back into the pr-checks sources.

Changes:

  • Add pr-checks/sync_back.ts to scan generated workflows and sync action versions back into pr-checks/sync.ts and pr-checks/checks/*.yml.
  • Add pr-checks/sync_back.test.ts with Node test coverage for the new TS implementation.
  • Update .github/workflows/rebuild.yml to run the new sync_back.ts via tsx during Dependabot rebuilds.

Reviewed changes

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

File Description
pr-checks/sync_back.ts New TS sync-back implementation that updates template/action version references based on generated workflows.
pr-checks/sync_back.test.ts New Node tests for the TS sync-back implementation.
.github/workflows/rebuild.yml Switch rebuild workflow sync-back step from Python to npx tsx sync_back.ts.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pr-checks/sync_back.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .github/workflows/rebuild.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Base automatically changed from mbg/pr-checks/ts to main March 3, 2026 11:06
mbg added 5 commits March 3, 2026 11:36
@mbg
Merge remote-tracking branch 'origin/main' into mbg/ts/sync-back
aaed7b7
@mbg
Update pr-checks to run new tests
24fa947
@mbg
Remove python setup from rebuild workflow
bf9bf1c
@mbg
Remove python files from pr-checks
77fc89c
@mbg
Update pr-checks README
0a5b95c
@github-actions github-actions Bot added size/XL May be very hard to review and removed size/L May be hard to review labels Mar 3, 2026
@esbena
esbena self-requested a review March 3, 2026 11:48
esbena
esbena requested changes Mar 3, 2026
View reviewed changes

@esbena esbena left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Despite this being a migration of existing code, I do want a somewhat significant change. Could we take the various regular expression based parsing we have and move that into its own module? A file-internal dictionary is fine.

My main motivations for requesting this are:

  • I worry about redundant patterns currently.
  • I worry about too-specific patterns, where it is hard to see that they're wrong because they are placed in a very specific coding context.
  • They are general parsings that deserve their own very detailed JSDoc descriptions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pr-checks/sync_back.ts

// Find all action uses in the file, including potential comments
// This pattern captures: action_name@version_with_possible_comment
const pattern = /uses:\s+([^/\s]+\/[^@\s]+)@([^@\n]+)/g;

@esbena esbena Mar 3, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Please see the general comments about regex parsing, but as an example of that, this is one of three regex that uses the uses: prefix...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
esbena
esbena approved these changes Mar 5, 2026
View reviewed changes

@esbena esbena left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Approved as per internal discussion

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mbg reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@mbg
mbg added this pull request to the merge queue Mar 5, 2026
Merged via the queue into main with commit b1b5550 Mar 5, 2026
244 of 247 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mbg
mbg deleted the mbg/ts/sync-back branch March 5, 2026 12:58
@mbg mbg mentioned this pull request Mar 5, 2026
Document regular expressions in sync_back.ts #3547
Closed
This was referenced Mar 5, 2026
Merge main into releases/v4 #3551
Merged
Merge releases/v4 into releases/v3 #3553
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@esbena esbena esbena approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@mbg mbg

Labels

size/XL May be very hard to review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mbg @esbena
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.