Skip to content

Commit d449e9b

Browse files
vim-zzclaude
andauthored
fix: replace unsupported action-level 'when' with separate automations in gitstream.cm (#845)
The 'when' key is not supported at the action level. Split the two conditional add-label actions into dedicated automations (pr_policy_unresolved_threads, pr_policy_missing_jira) with proper automation-level 'if' conditions. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6c1ad37 commit d449e9b

1 file changed

Lines changed: 25 additions & 13 deletions

File tree

docs/downloads/gitstream.cm

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,6 @@ automations:
3131
label: "{{ calc.etr }} min review"
3232
color: {{ colors.red if (calc.etr >= 20) else (colors.yellow if (calc.etr >= 5) else colors.green) }}
3333

34-
- action: add-label@v1
35-
when : {{ pr.unresolved_threads }}
36-
args:
37-
label: "{{ pr.unresolved_threads | default(value=0) }} unresolved thread(s)"
38-
color: {{ colors.yellow }}
39-
40-
- action: add-label@v1
41-
when: {{ not (has.jira_ticket_in_title or has.jira_ticket_in_desc) }}
42-
args:
43-
label: "missing-jira"
44-
color: {{ colors.red }}
45-
# further automations available with Jira webhook
46-
4734
# Assign reviewers silently
4835
- action: add-reviewers@v1
4936
args:
@@ -67,6 +54,31 @@ automations:
6754
6855
> Labels/reviewers were applied quietly to keep this PR clean.
6956
57+
pr_policy_unresolved_threads:
58+
on: [pr_created, commit]
59+
if:
60+
- {{ not pr.draft }}
61+
- {{ not is.bot }}
62+
- {{ pr.unresolved_threads }}
63+
run:
64+
- action: add-label@v1
65+
args:
66+
label: "{{ pr.unresolved_threads | default(value=0) }} unresolved thread(s)"
67+
color: {{ colors.yellow }}
68+
69+
pr_policy_missing_jira:
70+
on: [pr_created, commit]
71+
if:
72+
- {{ not pr.draft }}
73+
- {{ not is.bot }}
74+
- {{ not (has.jira_ticket_in_title or has.jira_ticket_in_desc) }}
75+
run:
76+
- action: add-label@v1
77+
args:
78+
label: "missing-jira"
79+
color: {{ colors.red }}
80+
# further automations available with Jira webhook
81+
7082
# ----------------- config -----------------
7183
calc:
7284
etr: {{ branch | estimatedReviewTime }}

0 commit comments

Comments
 (0)