Skip to content

Enforcing template with a workflow - #5021

Merged
Vidal Ortega (vidorteg) merged 3 commits into
mainfrom
user/vidorteg/fix-issue-template
Sep 15, 2026
Merged

Vidal Ortega (vidorteg) merged 3 commits into
mainfrom
user/vidorteg/fix-issue-template

Conversation

@vidorteg

Copy link
Copy Markdown
Contributor

Enforcing bug template when reporting bugs or opening feature requests

Copilot AI lite review requested due to automatic review settings September 15, 2026 19:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved moderate issues affect template links and validation coverage.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds structured GitHub issue forms and automated validation for bug reports and feature requests.

Changes:

  • Replaces Markdown templates with YAML forms.
  • Disables blank issue submissions.
  • Adds workflow validation and closure for incomplete issues.
File summaries
File Summary
.github/workflows/validate-issue.yml Validates labeled issues, but has unresolved moderate gaps for unlabeled/API submissions, required acknowledgements, and edited/reopened issues; the closure checklist also omits expected behavior (nit).
.github/ISSUE_TEMPLATE/feature_request.yml Adds the structured feature form; existing callers still reference the deleted Markdown template (moderate, 2 votes).
.github/ISSUE_TEMPLATE/feature_request.md Removes the legacy feature template.
.github/ISSUE_TEMPLATE/config.yml Disables blank issue submissions.
.github/ISSUE_TEMPLATE/bug_report.yml Adds the structured bug form; existing callers still reference the deleted Markdown template (moderate, 2 votes).
.github/ISSUE_TEMPLATE/bug_report.md Removes the legacy bug template.
Review details

Suppressed comments (3)

.github/workflows/validate-issue.yml:16

  • The validator only runs when the issue already has a bug or enhancement label. blank_issues_enabled: false restricts the web form chooser, but issues created through the API (including a bug/feature-shaped title and body) can omit those labels and bypass all validation. If this workflow is intended to enforce these templates, trigger validation for those submissions independently of labels (for example, classify the form from the title/body or reject the unlabeled form-shaped issue).
    if: >-
      contains(github.event.issue.labels.*.name, 'bug') ||
      contains(github.event.issue.labels.*.name, 'enhancement')

.github/workflows/validate-issue.yml:59

  • Both issue forms mark the two Submission checks options as required, but requiredSections contains only the text fields, so an API-created issue with all six/two text answers filled and no checked submission acknowledgements is accepted. That leaves part of the required template unenforced; parse this section and require the expected checked options, or remove the required validations if they are not meant to be enforced here.
            const values = requiredSections.map(section => {
              const lines = sections.get(section);
              return lines ? lines.join('\n').trim() : undefined;
            });

.github/workflows/validate-issue.yml:6

  • This workflow validates only the opened event. Because issue bodies remain editable, a reporter can remove required sections after a valid submission (or reopen an invalid issue) and leave it open without another validation run. Add edited and reopened to the trigger if this workflow is intended to enforce the template throughout the issue lifecycle.
  issues:
    types:
      - opened
  • Files reviewed: 6/6 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/ISSUE_TEMPLATE/bug_report.yml
Comment thread .github/ISSUE_TEMPLATE/feature_request.yml
Comment thread .github/workflows/validate-issue.yml
@vidorteg
Vidal Ortega (vidorteg) merged commit 1029e94 into main Sep 15, 2026
7 checks passed
@vidorteg
Vidal Ortega (vidorteg) deleted the user/vidorteg/fix-issue-template branch September 15, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants