Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/release-lsp-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ jobs:
steps:
- name: Resolve tag
id: resolve
env:
RAW_TAG: ${{ inputs.tag || github.ref_name }}
run: |
TAG="${{ inputs.tag || github.ref_name }}"
TAG=$(echo "$RAW_TAG" | xargs)
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
Comment on lines +37 to 41
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Guard against whitespace-only dispatch input.

Line [40] can produce an empty TAG; add an explicit check to fail with a clear error before metadata/release jobs run.

Suggested patch
       run: |
         TAG=$(echo "$RAW_TAG" | xargs)
+        if [[ -z "$TAG" ]]; then
+          echo "::error::Tag is empty after trimming whitespace"
+          exit 1
+        fi
         echo "tag=$TAG" >> "$GITHUB_OUTPUT"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-lsp-binary.yml around lines 37 - 41, After
trimming RAW_TAG into TAG, add a guard that checks if TAG is empty or only
whitespace and, if so, emit a clear error to stderr and exit non‑zero before
writing to GITHUB_OUTPUT; update the script that uses RAW_TAG/TAG in the
workflow's run block to validate TAG (using the trimmed TAG variable) and fail
early with a descriptive message so downstream metadata/release jobs don't run
with an empty TAG.


- name: Extract metadata from tag
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-lsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ jobs:
steps:
- name: Resolve tag
id: resolve
env:
RAW_TAG: ${{ inputs.tag || github.ref_name }}
run: |
TAG="${{ inputs.tag || github.ref_name }}"
TAG=$(echo "$RAW_TAG" | xargs)
echo "tag=$TAG" >> "$GITHUB_OUTPUT"

- name: Extract metadata from tag
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ jobs:
steps:
- name: Resolve tag
id: resolve
env:
RAW_TAG: ${{ inputs.tag || github.ref_name }}
run: |
TAG="${{ inputs.tag || github.ref_name }}"
TAG=$(echo "$RAW_TAG" | xargs)
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
Comment on lines +37 to 41
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add an empty-tag guard after trimming.

After Line [40], validate TAG is non-empty so the workflow fails early with a clear message instead of failing downstream.

Suggested patch
       run: |
         TAG=$(echo "$RAW_TAG" | xargs)
+        if [[ -z "$TAG" ]]; then
+          echo "::error::Tag is empty after trimming whitespace"
+          exit 1
+        fi
         echo "tag=$TAG" >> "$GITHUB_OUTPUT"
📝 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
env:
RAW_TAG: ${{ inputs.tag || github.ref_name }}
run: |
TAG="${{ inputs.tag || github.ref_name }}"
TAG=$(echo "$RAW_TAG" | xargs)
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
env:
RAW_TAG: ${{ inputs.tag || github.ref_name }}
run: |
TAG=$(echo "$RAW_TAG" | xargs)
if [[ -z "$TAG" ]]; then
echo "::error::Tag is empty after trimming whitespace"
exit 1
fi
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 37 - 41, After trimming RAW_TAG
into TAG, add a guard that checks TAG is non-empty and fails the job with a
clear message if empty; specifically, after TAG=$(echo "$RAW_TAG" | xargs)
validate TAG and only echo "tag=$TAG" to GITHUB_OUTPUT when non-empty, otherwise
print an explanatory error and exit non-zero to stop the workflow early (use the
existing RAW_TAG, TAG and GITHUB_OUTPUT symbols).


- name: Extract metadata from tag
Expand Down
Loading