ci: allow PRs to merge when CI jobs are skipped#123
Merged
Conversation
Add path-based filtering using dorny/paths-filter to detect relevant changes and conditionally run CI jobs. This allows PRs that don't affect code (e.g., README changes) to merge without waiting for skipped required checks. - Add 'changes' job to detect modified paths - First-tier jobs (check-skill, lint, test-unit) gate on change detection - Downstream jobs inherit skip behavior from dependencies - Add 'ci-status' job as single required check that passes when jobs skip - Always run full CI on release/** branches regardless of paths
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 1756 uncovered lines. Files with missing lines (24)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 66.66% 66.66% —%
==========================================
Files 45 45 —
Lines 5267 5267 —
Branches 0 0 —
==========================================
+ Hits 3511 3511 —
- Misses 1756 1756 —
- Partials 0 0 —Generated by Codecov Action |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
When an upstream job like lint or test-unit fails, dependent jobs are marked as 'skipped' rather than 'failure'. The ci-status job now detects this scenario by checking if changes were detected but the expected jobs were skipped, which indicates an upstream failure.
3 tasks
BYK
added a commit
that referenced
this pull request
Mar 18, 2026
…#456) ## Problem The `ContextError` and `ResolutionError` classes produce structured `Try: ... Or: ...` error messages, but they're misused in ~15 call sites, producing confusing output. Real Sentry issues confirm this affects hundreds of users: - **CLI-7V** (127 events, 35 users): `Project is required. Specify it using: No project 'patagonai' found...` - **CLI-4A** (21 events, 13 users): `Project 'AGENT-API' not found is required.` - **CLI-EZ**: `Trace ID and span ID is required.` (grammar) + irrelevant DSN alternatives ## Changes **Error class fixes:** - Fix grammar: `"X and Y is required"` → `"are required"` for compound resources - Convert 8 `ContextError` misuses to `ResolutionError` (org-list, project/list, issue/list, project/create, resolve-team, project/view, resolve-target) - Convert pagination cursor error to `ValidationError` - Pass `alternatives: []` at 14 sites where DSN hints are irrelevant (Trace ID, Log ID, Event ID, Span ID) **event view enhancement:** - Issue URLs (`/issues/123/`) now fetch the latest event via `getLatestEvent()` instead of throwing a confusing error about missing event IDs **Prevention measures:** - Runtime assertion in `ContextError` constructor: `command` must be single-line (throws on `\n`) - CI check script (`script/check-error-patterns.ts`) scanning for multiline ContextError commands and ad-hoc `Try:` patterns in `CliError` - Added `check:errors` step to CI workflow - Updated AGENTS.md with error class selection guidance Fixes CLI-7V, CLI-4A, CLI-EZ, CLI-CC, CLI-DQ
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
Fixes the issue where PRs that don't change relevant files (e.g., only README.md) cannot be merged because required CI checks are skipped rather than passing.
Changes
changesjob: Usesdorny/paths-filter(SHA-pinned to v3.0.2) to detect which files changedcheck-skill,lint,test-unit) check the filter outputs; downstream jobs inherit skip behavior from their dependenciesci-statusjob: Single required check that runs withif: always()and passes when jobs are skipped, fails if any job failed/cancelledrelease/**branches regardless of changed pathsPost-Merge Action
Update branch protection rules for
main:CI Statusas the only required check