Skip to content

Port rebuild workflow#1417

Merged
mbg merged 1 commit into
mainfrom
mbg/ci/rebuild-workflow
Jun 19, 2026
Merged

Port rebuild workflow#1417
mbg merged 1 commit into
mainfrom
mbg/ci/rebuild-workflow

Conversation

@mbg

@mbg mbg commented Jun 19, 2026

Copy link
Copy Markdown
Member

Ports a (slightly modified) version of the rebuild workflow from the CodeQL Action, since we have the same use case here that the JS in the dist directory needs to be rebuilt and checked into the repository when there are changes to the TypeScript code or its dependencies. This doesn't automatically happen for e.g. Dependabot PRs, so we have this workflow to rebuild the bundled JS when a specific label is added to a PR.

@mbg mbg self-assigned this Jun 19, 2026
Copilot AI review requested due to automatic review settings June 19, 2026 15:33
@mbg mbg requested a review from a team as a code owner June 19, 2026 15:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Not ready to approve

The new workflow has reliability/maintainability issues (hard-coded repository in gh commands and missing same-repo gating for label-triggered runs) that can cause failures or make the workflow non-reusable.

Pull request overview

This PR adds a GitHub Actions workflow to rebuild and commit the generated dist JavaScript when a PR is labeled (or manually dispatched), targeting cases like Dependabot where rebuilds don’t happen automatically.

Changes:

  • Introduces a rebuild workflow triggered on PR label events and workflow_dispatch.
  • Checks out the PR branch, merges the base branch (allowing dist/ conflicts), runs npm ci + lint/build, then commits/pushes any rebuild output.
  • Uses GitHub CLI to remove the triggering label and to comment/update PR draft state after pushing.
File summaries
File Description
.github/workflows/rebuild.yml Adds a label-driven rebuild-and-push workflow for generated dist artifacts.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 6

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


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

Comment thread .github/workflows/rebuild.yml
Comment thread .github/workflows/rebuild.yml
Comment thread .github/workflows/rebuild.yml
Comment thread .github/workflows/rebuild.yml
Comment thread .github/workflows/rebuild.yml
Comment thread .github/workflows/rebuild.yml
@mbg mbg enabled auto-merge June 19, 2026 16:17

@henrymercer henrymercer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice. Will you open a separate PR to pin the rest of the Actions in this repo?


steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pin to v7 rather than v6?

Comment thread .github/workflows/rebuild.yml
@mbg mbg merged commit 5c7cd3c into main Jun 19, 2026
10 checks passed
@mbg mbg deleted the mbg/ci/rebuild-workflow branch June 19, 2026 16:53
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