Skip to content

fix(action): support title override for col-axis charts#267

Merged
fahimfaisaal merged 1 commit into
mainfrom
feat/col-axis-chart-action
Jul 23, 2026
Merged

fix(action): support title override for col-axis charts#267
fahimfaisaal merged 1 commit into
mainfrom
feat/col-axis-chart-action

Conversation

@hfl0506

@hfl0506 hfl0506 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

Fixes #237
Related PR #245

Changes

  • Added title input to action.yml
  • Forwarded it as --title
  • Documented it in the action reference

Summary by CodeRabbit

  • New Features

    • Added an optional title input to the GitHub Action for overriding the chart title when a single chart is generated.
  • Documentation

    • Documented the new title input and clarified its distinction from the existing name input.

@hfl0506
hfl0506 requested a review from fahimfaisaal as a code owner July 23, 2026 07:40
@hfl0506 hfl0506 self-assigned this Jul 23, 2026
@hfl0506 hfl0506 added the action vizb action.yml releated work label Jul 23, 2026
@hfl0506 hfl0506 added this to the Release v0.17.0 milestone Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The GitHub Action now accepts an optional title input, forwards it as --title to vizb when set, and documents its behavior for single charts produced with col-axis.

Changes

GitHub Action title override

Layer / File(s) Summary
Title input flow
action.yml, docs/src/content/docs/ci-cd/github-action.mdx
The action defines the optional title input, conditionally forwards it to vizb as --title, and documents that it independently overrides the chart title for col-axis single-chart output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: fahimfaisaal

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR only adds an action input and docs; it does not implement the CLI behavior, warnings, or tests required by #237. Implement the CLI --title behavior for col-axis single-chart cases, including ignore/warn paths, tests, and docs.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a title override for col-axis charts in the action.
Out of Scope Changes check ✅ Passed The changes stay focused on the title override input and its documentation, with no unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
action.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@action.yml`:
- Line 263: Update the argument construction around VIZB_ARGS to pass
inputs.title through the step environment instead of interpolating it into
generated Bash source. Expand the environment variable only at runtime when
appending --title, preserving the existing conditional behavior and safely
handling quotes, command substitutions, backticks, and newlines.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6a4c2ddb-9c65-45e2-a26b-f93d7f7eac42

📥 Commits

Reviewing files that changed from the base of the PR and between 3001474 and 04acd97.

📒 Files selected for processing (2)
  • action.yml
  • docs/src/content/docs/ci-cd/github-action.mdx

Comment thread action.yml
[ -n "${{ inputs.tag }}" ] && VIZB_ARGS+=(--tag "${{ inputs.tag }}")
[ -n "${{ inputs.id }}" ] && VIZB_ARGS+=(--id "${{ inputs.id }}")
[ -n "${{ inputs.name }}" ] && VIZB_ARGS+=(-n "${{ inputs.name }}")
[ -n "${{ inputs.title }}" ] && VIZB_ARGS+=(--title "${{ inputs.title }}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Avoid interpolating inputs.title directly into Bash source.

A title containing ", $(), backticks, or newlines can alter this generated shell command and execute unintended commands. Pass the input through the step environment, then expand the environment variable inside the array.

Proposed fix
       env:
         INPUT_SELECT: ${{ inputs.select }}
+        INPUT_TITLE: ${{ inputs.title }}
...
-        [ -n "${{ inputs.title }}" ] && VIZB_ARGS+=(--title "${{ inputs.title }}")
+        [ -n "$INPUT_TITLE" ] && VIZB_ARGS+=(--title "$INPUT_TITLE")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[ -n "${{ inputs.title }}" ] && VIZB_ARGS+=(--title "${{ inputs.title }}")
[ -n "$INPUT_TITLE" ] && VIZB_ARGS+=(--title "$INPUT_TITLE")
🤖 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 `@action.yml` at line 263, Update the argument construction around VIZB_ARGS to
pass inputs.title through the step environment instead of interpolating it into
generated Bash source. Expand the environment variable only at runtime when
appending --title, preserving the existing conditional behavior and safely
handling quotes, command substitutions, backticks, and newlines.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fahimfaisaal
fahimfaisaal merged commit df64fe8 into main Jul 23, 2026
12 checks passed
@fahimfaisaal
fahimfaisaal deleted the feat/col-axis-chart-action branch July 23, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action vizb action.yml releated work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat]: --title flag to override chart title for single-chart --col-axis

3 participants