Skip to content

ci(small): Fix YAML syntax error in PR squash workflow#9422

Open
arii wants to merge 1 commit intoleaderfrom
fix-pr-squash-yaml-syntax-14465911381527024223
Open

ci(small): Fix YAML syntax error in PR squash workflow#9422
arii wants to merge 1 commit intoleaderfrom
fix-pr-squash-yaml-syntax-14465911381527024223

Conversation

@arii
Copy link
Owner

@arii arii commented Feb 26, 2026

Description

This PR fixes a syntax error in the .github/workflows/pr-squash.yml file that prevented it from being parsed correctly by GitHub. The fix involves moving GitHub Actions expressions from direct interpolation in JavaScript strings into the env block, and then accessing them via process.env. This pattern is more robust and prevents issues with special characters or invalid YAML structures.

Fixes #9421

Change Type: 🐛 Bug fix (non-breaking change fixing an issue)

Related Issues

Closes #9421

Original PR Body

This PR fixes a syntax error in the .github/workflows/pr-squash.yml file that prevented it from being parsed correctly by GitHub. The fix involves moving GitHub Actions expressions from direct interpolation in JavaScript strings into the env block, and then accessing them via process.env. This pattern is more robust and prevents issues with special characters or invalid YAML structures.

Fixes #9421


PR created automatically by Jules for task 14465911381527024223 started by @arii

@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@google-labs-jules google-labs-jules bot mentioned this pull request Feb 26, 2026
@github-actions github-actions bot changed the title Fix YAML syntax error in PR squash workflow ci(small): Fix YAML syntax error in PR squash workflow Feb 26, 2026
@arii
Copy link
Owner Author

arii commented Feb 26, 2026

@pr-squash

@arii arii added the not reviewed The review could not be performed or completed successfully. label Feb 26, 2026
@github-actions
Copy link
Contributor

❌ Automatic squash and rebase failed. The branch has conflicts with leader. Please resolve the conflicts manually and try again.

@arii arii added not reviewed The review could not be performed or completed successfully. and removed not reviewed The review could not be performed or completed successfully. labels Feb 27, 2026
@arii
Copy link
Owner Author

arii commented Mar 2, 2026

@pr-squash

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

❌ Automatic squash and rebase failed. The branch has conflicts with leader. Please resolve the conflicts manually and try again.

@arii arii added not reviewed The review could not be performed or completed successfully. and removed not reviewed The review could not be performed or completed successfully. labels Mar 2, 2026
@arii
Copy link
Owner Author

arii commented Mar 2, 2026

@pr-squash

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

❌ Automatic squash and rebase failed. The branch has conflicts with leader. Please resolve the conflicts manually and try again.

@arii arii force-pushed the fix-pr-squash-yaml-syntax-14465911381527024223 branch from 87b9f6d to d62f9f8 Compare March 2, 2026 23:59
@arii arii added not reviewed The review could not be performed or completed successfully. and removed not reviewed The review could not be performed or completed successfully. labels Mar 3, 2026
Refactored the `pr-squash.yml` workflow to use environment variables for passing dynamic values into `actions/github-script` blocks. This fixes a YAML syntax error on line 165 caused by unquoted expressions and follows the recommended best practice for robustness and security.

Co-authored-by: arii <342438+arii@users.noreply.github.com>

Revert "feat(large): Unify Persistent Footers for Mobile Optimization" (#9426)

fix(ci): resolve workflow syntax errors and PR resolution issues

- Refactored `pr-squash.yml`, `gemini-triage.yml`, and `reusable-gemini-review.yml` to use environment variables for passing dynamic GitHub Actions expressions into `github-script` blocks.
- Converted tabs to spaces in `gemini-triage.yml` to fix YAML parsing errors.
- Added fallback for `PR_NUMBER` resolution in `reusable-gemini-review.yml` to support `issue_comment` triggers on Pull Requests.
- Standardized use of `process.env` and `Number()` in scripts for robustness and security.

Co-authored-by: arii <342438+arii@users.noreply.github.com>

fix(ci): resolve workflow syntax errors and improve script robustness

- Fixed YAML syntax error in `pr-squash.yml` by using environment variables.
- Fixed YAML syntax error and indentation in `gemini-triage.yml` (converted tabs to spaces).
- Fixed PR number resolution in `reusable-gemini-review.yml` for comment triggers.
- Refactored all `github-script` actions to use `env` variables instead of direct interpolation for better security and reliability.

Co-authored-by: arii <342438+arii@users.noreply.github.com>

chore(deps): bump actions/upload-artifact from 4 to 7 (#9428)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore(deps-dev): bump @axe-core/playwright from 4.11.0 to 4.11.1 (#9437)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore(deps-dev): bump lint-staged from 16.2.7 to 16.3.1 (#9436)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore(deps-dev): bump jsdom from 27.4.0 to 28.1.0 (#9434)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore(deps): bump actions/download-artifact from 4 to 8 (#9427)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore(deps): bump @asteasolutions/zod-to-openapi from 8.4.0 to 8.4.2 (#9438)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore(deps): bump the mui group with 3 updates (#9429)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@arii arii force-pushed the fix-pr-squash-yaml-syntax-14465911381527024223 branch from d62f9f8 to b08bf37 Compare March 3, 2026 04:04
@arii arii added not reviewed The review could not be performed or completed successfully. and removed not reviewed The review could not be performed or completed successfully. labels Mar 3, 2026
@arii
Copy link
Owner Author

arii commented Mar 3, 2026

🤖 AI Technical Audit

🛑 Critical Review: Scope Creep & Breaking Changes

This PR is titled "Fix YAML syntax error" (implying a small, targeted fix) but effectively dismantles the entire ChatOps/Manual Trigger architecture for this repository. It deletes documentation, removes routing logic for Triage/Coder/Review-Issues, and modifies deployment logic.

🚨 Critical Issues

  1. Misleading PR Description: The title claims to fix a small YAML error in pr-squash.yml. However, the diff shows the deletion of docs/workflows/MANUAL_TRIGGERS.md, removal of the welcome job in pr-orchestrator.yml, and gutting of comment-ops.yml. If these features are being deprecated, the PR title and description must reflect that. If this was accidental (e.g., a bad merge or revert), this PR is dangerous.
  2. Syntax Error in deploy.yml: You introduced a syntax error in the deployment script.
  3. Variable Scoping Regression: In deploy.yml, you switched from vars. to env. without defining the environment variable, likely breaking the build.

📂 File-by-File Analysis

1. .github/workflows/deploy.yml

Problem A: Syntax Error
You added a trailing double-quote without an opening quote.

Problem B: Variable Scope
You removed the definition of NEXT_PUBLIC_USE_NATIVE_TABLE from the env block (line 40) but try to access it via ${{ env... }} later. Since it is no longer defined in the step's environment, this resolves to an empty string.

Implementation Sample (Fix):

# .github/workflows/deploy.yml

# Keep this in the step 'env' block if you want to use it later as an env var
- name: 🟢 Setup Node.js
  with:
    # ...
  env:
    # RESTORE THIS
    NEXT_PUBLIC_USE_NATIVE_TABLE: ${{ vars.NEXT_PUBLIC_USE_NATIVE_TABLE }}

# ... later in the run block ...
run: |
  # ...
  # FIX QUOTING AND REFERENCE
  NEXT_PUBLIC_USE_NATIVE_TABLE="${{ env.NEXT_PUBLIC_USE_NATIVE_TABLE }}"

2. .github/workflows/comment-ops.yml

Problem: Feature Stripping
You removed the logic that detects @gemini-triage, @gemini-coder, and @create-review-issues. This effectively kills these features for users. Is this intended?

3. .github/workflows/pr-squash.yml

Praise: The change to use process.env instead of interpolating ${{ inputs... }} directly into the script string is excellent. This prevents injection attacks and syntax errors with special characters.

// Good change
const comment_id = Number(process.env.COMMENT_ID);

🛡️ Anti-AI-Slop Directives

  1. CODE RATIO: This PR deletes massive amounts of code (>200 lines). While deleting dead code is good, deleting active features without documentation is hazardous.
  2. STALE FEATURES: The PR deletes docs/workflows/MANUAL_TRIGGERS.md. Ensure that the README.md updates accurately reflect the remaining capabilities. The README.md diff seems to imply some commands remain, but the comment-ops.yml logic to route them is gone.
  3. OVER-ENGINEERING: N/A - This is technically "Under-engineering" by stripping features.

Recommendation: Request Changes. Do not merge until the scope is clarified and the syntax error in deploy.yml is fixed.

Review automatically published via RepoAuditor.

@arii arii marked this pull request as ready for review March 3, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change bug Something isn't working ci not reviewed The review could not be performed or completed successfully. request-changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pr-squash.yml

1 participant