USHIFT-6933: Script fix-test-bugs PR parsing logic#175
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ggiguash The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe PR moves standalone JIRA-PR lookup logic into ChangesBatch PR Check Consolidation
🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels: ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@plugins/microshift-ci/scripts/fix-test-bugs.sh`:
- Line 65: The case arm handling the --jira-keys flag (the "--jira-keys)"
pattern) reads "${2}" directly which breaks under set -u if the flag is last or
missing a value; update that branch to first verify a value exists and is not
another flag (e.g., ensure "$#" >= 2 and that "$2" doesn't begin with '-') and
if the check fails emit an error and exit non‑zero, otherwise assign jira_keys
from "$2" and shift 2.
In `@plugins/microshift-ci/skills/fix-test-bugs/SKILL.md`:
- Line 58: Update the Gate 1 decision-table row that currently uses the generic
skip reason "PR already exists" (the row beginning "1. Existing PR | Checked in
batch before the per-bug loop...") so the skip reason explicitly includes the
batch PR object's state and url (e.g. "PR exists: state=<state>, url=<url>");
ensure the text matches the execution output contract described in Step 1 by
replacing the generic phrase with a state/url-specific message.
🪄 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 YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: f7e6a15e-d496-435a-9ee7-7da1fdd31b2b
📒 Files selected for processing (3)
plugins/microshift-ci/scripts/check-jira-pr-links.shplugins/microshift-ci/scripts/fix-test-bugs.shplugins/microshift-ci/skills/fix-test-bugs/SKILL.md
💤 Files with no reviewable changes (1)
- plugins/microshift-ci/scripts/check-jira-pr-links.sh
There was a problem hiding this comment.
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 `@plugins/microshift-ci/scripts/fix-test-bugs.sh`:
- Around line 89-94: Add POSITIVE and NEGATIVE tests for the new jq
title-matching regex used when building "filtered" (the select(.title |
test("(^|\\s)" + $key + "[: ]")) expression); create one test that asserts
titles like "KEY: description", "KEY description", "some text KEY: desc",
"[release-X.Y] KEY: ..." and multi-key-containing titles DO match, and at least
one test that asserts substrings like "KEY1234" or "SOMEKEY-KEY" do NOT match;
implement these as shell/unit test cases that feed representative raw_json into
the script (using the key and state variables) and assert the filtered output
contains expected URLs/state for positives and is empty for negatives so future
changes to the regex are covered.
🪄 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 YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 6e20df1f-3f96-4eae-a342-13bfccc38f8f
📒 Files selected for processing (2)
plugins/microshift-ci/scripts/fix-test-bugs.shplugins/microshift-ci/skills/fix-test-bugs/SKILL.md
✅ Files skipped from review due to trivial changes (1)
- plugins/microshift-ci/skills/fix-test-bugs/SKILL.md
copejon
left a comment
There was a problem hiding this comment.
Looks good overall. 1 small correction to do with input parsing, the rest is just taste-based-nits.
|
/label ready-for-human-review This message is AI generated by the yolo-agent of edge-tooling. |
1 similar comment
|
/label ready-for-human-review This message is AI generated by the yolo-agent of edge-tooling. |
|
/label ready-for-human-review This message is AI generated by the yolo-agent of edge-tooling. |
Summary by CodeRabbit
New Features
Removed
Refactor
Documentation