Skip to content

fix: tag_name grep fails to match compact JSON from GitHub API - #9555

Open
BGameiro2000 wants to merge 1 commit into
makeplane:previewfrom
BGameiro2000:patch-1
Open

fix: tag_name grep fails to match compact JSON from GitHub API#9555
BGameiro2000 wants to merge 1 commit into
makeplane:previewfrom
BGameiro2000:patch-1

Conversation

@BGameiro2000

@BGameiro2000 BGameiro2000 commented Aug 5, 2026

Copy link
Copy Markdown

GitHub's API returns compact JSON with no space after the colon ("tag_name":"v1.4.0"), but the grep pattern requires one ("tag_name": "). This silently empties $latest_release, which then fails architecture image lookups with an invalid reference instead of actually stopping at the intended exit 1.

Type of Change

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Summary by CodeRabbit

  • Bug Fixes
    • Improved release version detection when formatting includes whitespace after the JSON field separator.

GitHub's API returns compact JSON with no space after the colon
("tag_name":"v1.4.0"), but the grep pattern requires one
("tag_name": "). This silently empties $latest_release, which
then fails architecture image lookups with an invalid reference
instead of actually stopping at the intended exit 1.
@BGameiro2000
BGameiro2000 requested a review from mguptahub as a code owner August 5, 2026 15:53
@CLAassistant

CLAassistant commented Aug 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The community installer now accepts optional whitespace after the JSON colon when extracting the GitHub release tag_name. Other behavior remains unchanged.

Changes

Release tag parsing

Layer / File(s) Summary
Allow optional JSON whitespace
deployments/cli/community/install.sh
checkLatestRelease now matches tag_name values with optional whitespace after the colon.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • makeplane/plane#9548: Both changes update the checkLatestRelease tag_name regex to allow optional whitespace.

Suggested reviewers: mguptahub

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically describes the main bug fix: the grep pattern failure when matching compact JSON from GitHub API.
Description check ✅ Passed The description includes detailed context about the bug, correctly identifies it as a bug fix, but omits non-critical template sections like Screenshots and Test Scenarios.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
deployments/cli/community/install.sh (1)

60-60: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Handle lookup failures separately from local.

local latest_release=$(...) masks the command-substitution status. The pipeline can also hide curl failures because sed determines the pipeline status by default. Declare latest_release separately, capture the response with curl -fsSL, and then parse it. This preserves the intended fail-closed behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deployments/cli/community/install.sh` at line 60, Update the latest release
lookup by declaring latest_release separately from its assignment, fetching the
GitHub response with curl -fsSL, and parsing the captured response afterward.
Ensure curl failures are detected before parsing so the installation retains its
fail-closed behavior, rather than relying on the pipeline status or local
assignment.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@deployments/cli/community/install.sh`:
- Line 60: Update the latest release lookup by declaring latest_release
separately from its assignment, fetching the GitHub response with curl -fsSL,
and parsing the captured response afterward. Ensure curl failures are detected
before parsing so the installation retains its fail-closed behavior, rather than
relying on the pipeline status or local assignment.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 021bacf4-39bf-4915-9e13-0d745e367540

📥 Commits

Reviewing files that changed from the base of the PR and between 31853ab and ae3df17.

📒 Files selected for processing (1)
  • deployments/cli/community/install.sh

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