Skip to content

Commit c98e65e

Browse files
committed
docs(buds): tracking-branch hint explains the BUD-number content guard
The override widget previously described only the fnmatch half of the filter ("Open PRs are matched against this pattern on each impacted repo. Supports fnmatch wildcards"). After the over-match fix added the content guard that requires PRs to also reference the BUD by number, that copy understated what surfaces a PR on a release-stage tab. Rewrites the in-card hint and the dialog body so both rules are visible. The example is now per-BUD: BUD-4 sees ``release/bud-001-bud-004``, BUD-12 sees ``release/bud-001-bud-012``. Threads ``bud_number`` from BUDDetail → BUDReleaseStagePanel → the override widget so the copy renders the actual reference, not a placeholder. Signed-off-by: Arun Rajkumar <mickyarunr@gmail.com>
1 parent 9575235 commit c98e65e

3 files changed

Lines changed: 37 additions & 3 deletions

File tree

frontend/src/components/buds/BUDReleaseStagePanel.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
PR to materialise. -->
2222
<BUDStageBranchOverride
2323
:bud-id="budId"
24+
:bud-number="budNumber"
2425
:stage="stage"
2526
:override="stageOverride"
2627
:default-branch="defaultStageBranch"
@@ -289,6 +290,10 @@ interface ImpactedRepo {
289290
290291
const props = defineProps<{
291292
budId: string
293+
/** This BUD's number. Threaded into the override widget so the helper
294+
* copy can reference ``bud-NNN`` concretely rather than as a
295+
* placeholder. */
296+
budNumber: number
292297
stage: ReleaseStage
293298
/** Whether ANY impacted repo of this BUD has the relevant branch configured.
294299
* Drives the empty-state CTA. Pass through from the parent. */

frontend/src/components/buds/BUDStageBranchOverride.vue

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@
4949
</v-btn>
5050
</div>
5151
<div class="text-caption text-medium-emphasis mt-1">
52-
Open PRs are matched against this pattern on each impacted repo.
53-
Supports fnmatch wildcards — e.g. <code>release/*</code> matches
54-
<code>release/2026-08-01</code>.
52+
A PR appears here when its base branch matches this pattern
53+
<strong>and</strong> its head branch or title carries
54+
<code>bud-{{ budNumber }}</code>. Multi-BUD release branches like
55+
<code>release/bud-001-bud-{{ paddedBudNumber }}</code> show up on
56+
every referenced BUD.
5557
</div>
5658
</v-card>
5759

@@ -68,6 +70,22 @@
6870
<code>{{ stage === 'uat' ? 'uat_branch' : 'main_branch' }}</code>
6971
setting.
7072
</p>
73+
<p class="text-caption text-medium-emphasis mb-3">
74+
A PR is surfaced only when both rules hold:
75+
</p>
76+
<ul class="text-caption text-medium-emphasis mb-3 ps-4">
77+
<li>
78+
Its base branch matches this pattern. Supports fnmatch
79+
wildcards — <code>release/*</code> matches
80+
<code>release/2026-08-01</code>.
81+
</li>
82+
<li>
83+
Its head branch or title contains
84+
<code>bud-{{ budNumber }}</code>. Release branches like
85+
<code>release/bud-001-bud-{{ paddedBudNumber }}</code> match
86+
this BUD and any other BUD also named in the branch.
87+
</li>
88+
</ul>
7189
<p
7290
v-if="impactedRepoCount > 1"
7391
class="text-caption text-medium-emphasis mb-3"
@@ -127,6 +145,10 @@ import type { ReleaseStage } from '@/types'
127145
128146
const props = defineProps<{
129147
budId: string
148+
/** This BUD's number — used by the helper copy so the rendered
149+
* example matches the actual BUD (``bud-4`` / ``bud-004``) instead
150+
* of a placeholder. */
151+
budNumber: number
130152
stage: ReleaseStage
131153
/** The per-BUD pattern when set, ``null`` to fall back to the repo default. */
132154
override: string | null
@@ -161,6 +183,11 @@ const impactedRepoCount = computed(() => props.impactedRepoCount ?? 0)
161183
162184
const stageLabel = computed(() => (props.stage === 'uat' ? 'UAT' : 'Production'))
163185
186+
// Zero-padded form (``004``) for the multi-BUD example so the copy
187+
// mirrors the convention developers actually use when chaining BUDs
188+
// into a release branch.
189+
const paddedBudNumber = computed(() => String(props.budNumber).padStart(3, '0'))
190+
164191
function cancel(): void {
165192
if (saving.value) return
166193
open.value = false

frontend/src/views/buds/BUDDetail.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@
369369
<v-tabs-window-item v-if="uatStageEnabled" value="uat">
370370
<BUDReleaseStagePanel
371371
:bud-id="bud.id"
372+
:bud-number="bud.bud_number"
372373
stage="uat"
373374
:has-stage-branch-configured="hasUatBranchConfigured"
374375
:impacted-repos="bud.impacted_repos"
@@ -381,6 +382,7 @@
381382
<v-tabs-window-item value="prod">
382383
<BUDReleaseStagePanel
383384
:bud-id="bud.id"
385+
:bud-number="bud.bud_number"
384386
stage="prod"
385387
:has-stage-branch-configured="hasMainBranchConfigured"
386388
:impacted-repos="bud.impacted_repos"

0 commit comments

Comments
 (0)