Skip to content

fix: replace jq != operator and add markdownlint troubleshooting#68

Merged
JacobPEvans merged 4 commits intomainfrom
fix/jq-ne-and-markdownlint-fixes
Mar 4, 2026
Merged

fix: replace jq != operator and add markdownlint troubleshooting#68
JacobPEvans merged 4 commits intomainfrom
fix/jq-ne-and-markdownlint-fixes

Conversation

@JacobPEvans
Copy link
Owner

@JacobPEvans JacobPEvans commented Mar 3, 2026

Summary

  • Fix 5: Replace != in jq expressions with (.x | length > 0) / inverted = logic — Claude Code's Bash tool pre-processes commands and escapes ! to \!, breaking jq's != operator. This affects resolve-pr-threads (2 files) and trigger-ai-reviews.
  • Fix 3: Add "Pre-Push Hook Auto-Fixes Files" edge case to rebase-pr skill — markdownlint pre-push hook can auto-modify CHANGELOG.md, dirtying the working tree mid-push.

Test plan

  • Verify jq expressions in resolve-pr-threads parse correctly
  • Verify trigger-ai-reviews logic is equivalent to before
  • Confirm rebase-pr edge case guidance is accurate

🤖 Generated with Claude Code


Important

Replace != in jq expressions and add markdownlint troubleshooting guidance in GitHub workflows.

  • Behavior:
    • Replace != in jq expressions with (.x | length > 0) or inverted = logic in resolve-pr-threads and trigger-ai-reviews due to escaping issues.
    • Add markdownlint troubleshooting guidance for pre-push hook auto-fixes in rebase-pr.
  • Files Affected:
    • resolve-pr-threads/SKILL.md and rest-api-patterns.md: Update jq expressions.
    • trigger-ai-reviews/SKILL.md: Update logic for PR state check.
    • rebase-pr/SKILL.md: Add edge case for markdownlint auto-fixes.

This description was created by Ellipsis for 5c206ee. You can customize this summary. It will automatically update as commits are pushed.

- Replace .body != "" with (.body | length > 0) in resolve-pr-threads
  skills — Claude Code Bash tool escapes ! to \! breaking jq's != operator
- Fix bash != in trigger-ai-reviews to avoid same issue
- Add markdownlint pre-push hook auto-fix troubleshooting to rebase-pr skill

(claude)
Copilot AI review requested due to automatic review settings March 3, 2026 15:16
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses two distinct issues: modifying jq expressions and a bash conditional to circumvent ! character escaping by a pre-processing tool, and enhancing the rebase-pr skill documentation with a new troubleshooting section for pre-push hook auto-fixes.

Highlights

  • jq != Operator Replacement: Replaced != in jq expressions with (.x | length > 0) in resolve-pr-threads documentation to prevent issues caused by Claude Code's Bash tool escaping !.
  • Bash Conditional Inversion: Inverted the logic of a bash conditional != to an equivalent = logic in trigger-ai-reviews to avoid ! escaping issues.
  • Markdownlint Troubleshooting: Added new troubleshooting guidance to the rebase-pr skill documentation for handling pre-push hooks that auto-fix files, specifically markdownlint modifying CHANGELOG.md.
Changelog
  • git-workflows/skills/rebase-pr/SKILL.md
    • Documented a new edge case for pre-push hook auto-fixes, specifically for markdownlint modifying CHANGELOG.md.
  • github-workflows/skills/resolve-pr-threads/SKILL.md
    • Updated a jq expression to use (.body | length > 0) instead of != "".
    • Added a troubleshooting note about ! escaping in jq expressions.
  • github-workflows/skills/resolve-pr-threads/rest-api-patterns.md
    • Updated a jq expression to use (.body | length > 0) instead of != "" for consistency.
  • github-workflows/skills/trigger-ai-reviews/SKILL.md
    • Modified a bash conditional from != "OPEN" to an inverted == "OPEN" logic to avoid ! escaping.
Activity
  • The pull request was created to address specific issues related to ! character escaping in bash and jq contexts, and to improve documentation for a git workflow skill.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 5c206ee in 12 seconds. Click for details.
  • Reviewed 68 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_jNeyoD0oIIDGT8aZ

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses an issue with the != operator in jq and shell scripts by replacing it with equivalent logic, and adds troubleshooting documentation for a pre-push hook edge case. The changes are generally good, but I have a couple of suggestions to improve consistency and code style. In rebase-pr/SKILL.md, the shell variable should be replaced with a placeholder to match the rest of the document. In trigger-ai-reviews/SKILL.md, the conditional logic can be made more concise and idiomatic.

@greptile-apps
Copy link

greptile-apps bot commented Mar 3, 2026

Greptile Summary

Fixed Claude Code Bash tool compatibility by replacing != operators that get escaped to \!. Changed jq expressions from .body != "" to (.body | length > 0) and inverted shell conditional logic to use = instead of !=. Also added troubleshooting documentation for markdownlint pre-push hook auto-fixes.

  • Replaced != in jq expressions (resolve-pr-threads, trigger-ai-reviews)
  • Added pre-push hook auto-fix troubleshooting to rebase-pr
  • Added \! escaping issue to troubleshooting table

Confidence Score: 5/5

  • Documentation-only changes with no runtime impact - safe to merge
  • All changes are to markdown documentation files, fixing known escaping issues with Claude Code's Bash tool. The jq and shell logic replacements are equivalent to the originals, and the added troubleshooting documentation improves clarity
  • No files require special attention

Important Files Changed

Filename Overview
git-workflows/skills/rebase-pr/SKILL.md Added "Pre-Push Hook Auto-Fixes Files" troubleshooting section to document handling markdownlint auto-modifications during push
github-workflows/skills/resolve-pr-threads/SKILL.md Replaced .body != "" with `(.body
github-workflows/skills/resolve-pr-threads/rest-api-patterns.md Replaced .body != "" with `(.body
github-workflows/skills/trigger-ai-reviews/SKILL.md Inverted shell conditional logic from != "OPEN" to = "OPEN" with else branch to avoid ! operator escaping

Last reviewed commit: 5c206ee

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates several workflow “skills” docs to avoid != where ! can be escaped by Claude Code’s Bash pre-processing, and adds troubleshooting guidance for markdownlint-related hook behavior during pushes.

Changes:

  • Rewrites jq filters that used .body != "" to use (.body | length > 0) in resolve-pr-threads docs.
  • Adjusts a PR open-state check in trigger-ai-reviews to avoid !=.
  • Adds a new rebase-pr edge case section covering pre-push hooks auto-modifying files (e.g., markdownlint on CHANGELOG.md).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
github-workflows/skills/trigger-ai-reviews/SKILL.md Inverts PR state check to avoid != in the shell test.
github-workflows/skills/resolve-pr-threads/rest-api-patterns.md Replaces jq .body != "" with a length-based non-empty check.
github-workflows/skills/resolve-pr-threads/SKILL.md Same jq filter update + adds troubleshooting row about ! escaping.
git-workflows/skills/rebase-pr/SKILL.md Adds guidance for handling pre-push hooks that modify files mid-push.

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

…ariable

Consistent with all other commands in the skill (lines 83, 99, 108-109, etc.)
which use the {branch} placeholder format.

(claude)
Replace verbose if/else with : # continue body with the standard
shell guard clause pattern. Functionally identical, avoids ! character.

(claude)
Replace \| (backslash-pipe) inside backtick code spans with &#124;
(HTML entity) in the troubleshooting table. The \| notation rendered
the backslash visibly in GitHub and produced invalid jq when copy-pasted.
The HTML entity renders as a plain | in GitHub markdown while also
satisfying markdownlint MD056 (table column count).

(claude)
@JacobPEvans JacobPEvans merged commit 3c61cb5 into main Mar 4, 2026
5 checks passed
@JacobPEvans JacobPEvans deleted the fix/jq-ne-and-markdownlint-fixes branch March 4, 2026 00:54
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.

2 participants