← Back to Pull requests

Handle both issue template fragment indentation styles #1541

Merged
jezdez merged 5 files (140 lines) on Dec 02, 2026 23:11 UTC
View on GitHub
jezdez jezdez commented on Dec 01, 2026 11:43 UTC
Author

Description

The repository updater includes issue_template_details.yml in the bug report form's body. Prettier formats this fragment as a standalone YAML list without leading indentation, so regenerating the form currently produces invalid YAML.

Use the dedent filter from conda/actions#566 to normalize the fragment before inserting it into the form. Avoid adding indentation twice when a comment at column zero prevents dedent from removing the list's indentation.

Update the shared template-files action to v26.12.1. Keep support for older updaters while repositories pick up the upgraded workflow, since an updater can copy the new workflow and render the shared template in the same run.

Supersedes conda/conda#17050 and removes the need for the temporary fragment exclusions in conda/conda-build#6284.

Thanks to @kenodegard for the dedent filter and to @travishathaway and @danyeaw for the formatter migrations.

Diff: 140 lines (+138 / -2) across 5 files Reviewer: travishathaway Review duration: 2127m
All Vouch review confidence checks passed
Residual risk 0.12 = Change Risk (0.38) × (1 − Review Confidence (0.69)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.38 · 140 lines diff across 5 files
0.38
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.47 · 5 substantive comment(s)
0.47
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
68%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.296
Real PR Conversation Timeline
9 items
travishathaway travishathaway approved these changes on Dec 01, 2026 13:07 UTC
Approved Reviewer

Approved these changes.

kenodegard kenodegard commented on code on Dec 01, 2026 19:30 UTC
Code Review
templates/issues/bug.yml:1
@@ -33,7 +33,14 @@ body:
       description: What should have happened instead? Please provide as many details as possible. The more information provided, the more likely we are able to replicate your problem and offer a solution.
     validations:
       required: true
-[% include 'issue_template_details.yml' ignore missing %]
+[# Preserve indented fragments while accepting standalone YAML. -#]
+[% set details %][% include 'issue_template_details.yml' ignore missing %][% endset -%]
+[% set details = details.lstrip('\n') -%]

trailing newlines can be stripped too?

kenodegard kenodegard commented on code on Dec 01, 2026 19:36 UTC
Code Review
templates/issues/bug.yml:1
@@ -33,7 +33,14 @@ body:
       description: What should have happened instead? Please provide as many details as possible. The more information provided, the more likely we are able to replicate your problem and offer a solution.
     validations:
       required: true
-[% include 'issue_template_details.yml' ignore missing %]
+[# Preserve indented fragments while accepting standalone YAML. -#]
+[% set details %][% include 'issue_template_details.yml' ignore missing %][% endset -%]
+[% set details = details.lstrip('\n') -%]
+[% set indentation = namespace(width=2) -%]
+[% for line in details.splitlines() if line.strip() and not line.lstrip().startswith('#') -%]
+[% if loop.first and line.startswith('  ') %][% set indentation.width = 0 %][% endif -%]
+[% endfor -%]
+[[ details | indent(indentation.width, first=true) if details else '' ]]

Would it be better if we add a dedent filter?

[[ details.strip('\n') | dedent | indent(2, first=true) if details else '' ]]

kenodegard kenodegard requested changes on Dec 02, 2026 00:51 UTC
Changes Requested Reviewer

Let's wait on https://github.com/conda/actions/pull/566 before merging

jezdez jezdez commented on Dec 02, 2026 11:55 UTC
Author

@kenodegard the conda/actions update is out and I've made use of it now here

kenodegard kenodegard commented on code on Dec 02, 2026 15:25 UTC
Code Review
templates/issues/bug.yml:1
@@ -33,7 +33,11 @@ body:
       description: What should have happened instead? Please provide as many details as possible. The more information provided, the more likely we are able to replicate your problem and offer a solution.
     validations:
       required: true
-[% include 'issue_template_details.yml' ignore missing %]
+[% set details %][% include 'issue_template_details.yml' ignore missing %][% endset -%]
+[# Older updaters may render this before picking up the new action version. -#]
+[% set details = (details | dedent if 'dedent' is filter else details).lstrip('\n') -%]

Bumped conda/actions version in all repos that define a issue_template_details.yml (see search), that way we can skip this extra conditional check

kenodegard kenodegard commented on code on Dec 02, 2026 17:28 UTC
Code Review
tests/test_issue_template.py:1
@@ -0,0 +1,94 @@
+"""Test rendering the shared GitHub bug report form."""
+
+from pathlib import Path
+from textwrap import dedent, indent
+
+import pytest
+import yaml
+from jinja2 import DictLoader, Environment
+
+TEMPLATE = Path(__file__).resolve().parents[1] / "templates/issues/bug.yml"

TEMPLATE = Path(__file__).parent.parent / "templates/issues/bug.yml"

kenodegard kenodegard approved these changes on Dec 02, 2026 17:29 UTC
Approved Reviewer

Approved these changes.

Assignees
jezdez jezdez
Labels
risk: low confidence: 68.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 38.5% (MEDIUM) · Higher = larger blast radius
38.5%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 68.5% · Lower = rushed or shallow review
68.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 12.1% · Safe to merge
12.1%