Open
Conversation
Add a lightweight `check_ts_changes` gate job to both `ts_tests.yml` and `ts_check_formatting.yml` workflows. The gate checks whether TS CI should run based on: - Always runs for pushes to main - Always runs for the changesets release branch (changeset-release/main) - For other PRs, inspects changed files and only runs if TS-related paths are affected (TS packages, examples, website, root configs, TS-related workflow files) This avoids running the full TS CI suite (typechecking, testing, example builds) for Elixir-only PRs, significantly reducing CI turnaround time. Also includes a dummy Elixir change to verify the new behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Review iteration 2: The previous Important issue about missing root-level config files has been fixed. The regex now includes tsconfig., eslint.config, .prettierrc, .prettierignore, and .npmrc. Script robustness has also been addressed with proper error handling. Two minor suggestions remain open: duplicated logic across workflow files, and packages/start/ being undocumented. This PR looks good to go. |
Address review feedback: - Add missing root-level TS config files to the path check regex (tsconfig.*, eslint.config.*, .prettierrc, .prettierignore, .npmrc) - Add error handling for the GitHub API call (defaults to running TS CI if the API call fails) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3991 +/- ##
=======================================
Coverage 88.74% 88.74%
=======================================
Files 25 25
Lines 2425 2425
Branches 610 613 +3
=======================================
Hits 2152 2152
Misses 271 271
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
check_ts_changesgate job tots_tests.ymlandts_check_formatting.ymlmainand for the changesets release branch (changeset-release/main)Electric.Plug.UtilsmoduledocTS-related paths that trigger CI
The check considers files in these paths as TS-related:
packages/{typescript-client,react-hooks,y-electric,experimental,start}/examples/website/pnpm-lock.yaml,package.json,pnpm-workspace.yaml,.tool-versions.github/workflows/{ts_*,ensure_sync_service*,pr.*}.github/actions/Note on this PR
TS CI will still run for this PR because the workflow files themselves (
.github/workflows/ts_*) are detected as TS-related changes. For subsequent Elixir-only PRs, TS CI will be skipped.Branch protection
If any TS CI job names are configured as required status checks, they will appear as "skipped" for Elixir-only PRs. GitHub treats skipped required checks as passing since Nov 2022, but verify your branch protection settings to ensure this works correctly.
Test plan
check_ts_changesjob runs and outputsshould_run=truefor this PR (since workflow files changed)main🤖 Generated with Claude Code