Skip to content

Commit 4de3e64

Browse files
vmrh21claude
andcommitted
fix: remove component-specific example and simplify branch targeting
- Remove llm-d specific example from Step 3.3 — workflow should be component-agnostic and read all repos/branches from the mapping file - Simplify branch logic: create PRs against default_branch + ALL active_release_branches for every repo, regardless of repo_type (mapping file is the source of truth, not repo_type heuristics) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 3924f59 commit 4de3e64

1 file changed

Lines changed: 9 additions & 28 deletions

File tree

workflows/cve-fixer/.claude/commands/cve.fix.md

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -142,42 +142,23 @@ Summary:
142142

143143
**3.3: For each target repo, determine target branches:**
144144

145-
The branches to fix depend on `repo_type`:
146-
147-
- **`upstream` or `midstream`**: target `default_branch` only (e.g., `main`)
148-
- Fixes flow forward from there — no backports needed at this level
149-
- **`downstream`**: target `default_branch` AND every branch in `active_release_branches`
150-
- Each branch gets its own separate PR — never combine multiple branches in one PR
151-
- If `active_release_branches` is empty, target `default_branch` only
145+
Read `default_branch` and `active_release_branches` directly from the mapping file entry.
146+
Create a PR against `default_branch` plus every branch in `active_release_branches`.
147+
This applies to all repo types — the mapping file is the source of truth for which branches need fixing.
152148

153149
```bash
154-
# Determine target branches per repo — deduplicate to avoid processing DEFAULT_BRANCH twice
155-
if [ "$REPO_TYPE" = "downstream" ]; then
156-
ALL_BRANCHES=("$DEFAULT_BRANCH" "${ACTIVE_RELEASE_BRANCHES[@]}")
157-
TARGET_BRANCHES=($(printf '%s\n' "${ALL_BRANCHES[@]}" | awk '!seen[$0]++'))
158-
else
159-
TARGET_BRANCHES=("$DEFAULT_BRANCH")
160-
fi
150+
# Target branches = default_branch + active_release_branches, deduplicated
151+
ALL_BRANCHES=("$DEFAULT_BRANCH" "${ACTIVE_RELEASE_BRANCHES[@]}")
152+
TARGET_BRANCHES=($(printf '%s\n' "${ALL_BRANCHES[@]}" | awk '!seen[$0]++'))
161153
```
162154

163-
**Example for llm-d inference-scheduler:**
164-
```
165-
upstream llm-d/llm-d-inference-scheduler → PR against: main
166-
midstream opendatahub-io/llm-d-inference-scheduler → PR against: main
167-
downstream red-hat-data-services/llm-d-inference-scheduler → PRs against:
168-
- main
169-
- rhoai-3.3
170-
- rhoai-3.4
171-
- rhoai-3.4-ea.1
172-
- rhoai-3.4-ea.2
173-
```
155+
Each branch gets its own separate PR — never combine multiple branches in one PR.
156+
If `active_release_branches` is empty in the mapping, only `default_branch` is targeted.
174157

175158
**Multi-repo + multi-branch strategy**:
176-
- Fix upstream repos first, then midstream, then downstream
177-
- For downstream: Steps 4 through 11 repeat for EACH branch independently
159+
- Steps 4 through 11 repeat for EACH repo and EACH branch independently
178160
- Each branch produces its own fix branch including the target branch name to avoid collisions:
179161
`fix/cve-YYYY-XXXXX-<package>-<target-branch>-attempt-1`
180-
e.g. `fix/cve-2025-66418-urllib3-rhoai-3.4-attempt-1`
181162
- Never combine fixes for multiple branches into a single PR
182163

183164
4. **Clone or Use Existing Repository**

0 commit comments

Comments
 (0)