Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/cli-pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,30 @@ permissions:
issues: write

jobs:
# Check what files changed to determine which jobs to skip
changes:
runs-on: ubuntu-latest
outputs:
docs-only: ${{ steps.check-changes.outputs.docs-only }}
steps:
- uses: actions/checkout@v5
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
non-docs:
- '!docs/**'
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 18, 2025

Choose a reason for hiding this comment

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

The non-docs filter never matches anything because it only contains a negative glob, so any PR that touches docs—even alongside code changes—will be misclassified as docs-only and will incorrectly skip the downstream checks.

Prompt for AI agents
Address the following comment on .github/workflows/cli-pr-checks.yml at line 27:

<comment>The `non-docs` filter never matches anything because it only contains a negative glob, so any PR that touches docs—even alongside code changes—will be misclassified as docs-only and will incorrectly skip the downstream checks.</comment>

<file context>
@@ -10,6 +10,30 @@ permissions:
+            docs:
+              - &#39;docs/**&#39;
+            non-docs:
+              - &#39;!docs/**&#39;
+      - name: Check if only docs changed
+        id: check-changes
</file context>
Fix with Cubic

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bdougie this seems valid

- name: Check if only docs changed
id: check-changes
run: |
if [[ "${{ steps.filter.outputs.docs }}" == "true" && "${{ steps.filter.outputs.non-docs }}" == "false" ]]; then
echo "docs-only=true" >> $GITHUB_OUTPUT
else
echo "docs-only=false" >> $GITHUB_OUTPUT
fi

track-rerun:
runs-on: ubuntu-latest
if: github.run_attempt > 1
Expand Down Expand Up @@ -55,6 +79,8 @@ jobs:
npm run lint

test:
needs: changes
if: needs.changes.outputs.docs-only != 'true'
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
Expand Down Expand Up @@ -126,11 +152,13 @@ jobs:
if: always()
runs-on: ubuntu-latest
needs:
- changes
- lint
- test

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
allowed-skips: test
jobs: ${{ toJSON(needs) }}
32 changes: 32 additions & 0 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@ on:
- main

jobs:
# Check what files changed to determine which jobs to skip
changes:
runs-on: ubuntu-latest
outputs:
docs-only: ${{ steps.check-changes.outputs.docs-only }}
steps:
- uses: actions/checkout@v5
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
non-docs:
- '!docs/**'
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 18, 2025

Choose a reason for hiding this comment

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

non-docs never matches anything because it only lists a negated glob, so any PR that touches docs will be treated as “docs-only” and the GUI/Binary/JetBrains checks will be skipped even when code files change.

Prompt for AI agents
Address the following comment on .github/workflows/pr-checks.yaml at line 28:

<comment>`non-docs` never matches anything because it only lists a negated glob, so any PR that touches docs will be treated as “docs-only” and the GUI/Binary/JetBrains checks will be skipped even when code files change.</comment>

<file context>
@@ -11,6 +11,30 @@ on:
+            docs:
+              - &#39;docs/**&#39;
+            non-docs:
+              - &#39;!docs/**&#39;
+      - name: Check if only docs changed
+        id: check-changes
</file context>
Fix with Cubic

- name: Check if only docs changed
id: check-changes
run: |
if [[ "${{ steps.filter.outputs.docs }}" == "true" && "${{ steps.filter.outputs.non-docs }}" == "false" ]]; then
echo "docs-only=true" >> $GITHUB_OUTPUT
else
echo "docs-only=false" >> $GITHUB_OUTPUT
fi

track-rerun:
runs-on: ubuntu-latest
if: github.run_attempt > 1
Expand Down Expand Up @@ -89,6 +113,8 @@ jobs:
INCEPTION_API_KEY: ${{ secrets.INCEPTION_API_KEY }}

gui-checks:
needs: changes
if: needs.changes.outputs.docs-only != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -119,6 +145,8 @@ jobs:
npm test

binary-checks:
needs: changes
if: needs.changes.outputs.docs-only != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -331,6 +359,8 @@ jobs:
is_fork: ${{ github.event.pull_request.head.repo.fork == true || github.actor == 'dependabot[bot]' }}

jetbrains-tests:
needs: changes
if: needs.changes.outputs.docs-only != 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand All @@ -349,6 +379,7 @@ jobs:
if: always()
runs-on: ubuntu-latest
needs:
- changes
- prettier-check
- core-checks
- gui-checks
Expand All @@ -365,4 +396,5 @@ jobs:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
allowed-skips: gui-checks, binary-checks, jetbrains-tests
jobs: ${{ toJSON(needs) }}
Loading