Skip to content

Detect issue and pull request templates#82

Merged
andrew merged 1 commit into
mainfrom
detect-templates
May 13, 2026
Merged

Detect issue and pull request templates#82
andrew merged 1 commit into
mainfrom
detect-templates

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented May 12, 2026

Report issue and pull request templates under resources.templates so that contributors and coding agents can find and follow them when opening issues or PRs.

Detection covers the locations recognised by GitHub, GitLab, Gitea, and Forgejo: repo root, docs/, .github/, .gitea/, .forgejo/, and .gitlab/. Both single-file templates (PULL_REQUEST_TEMPLATE.md, issue_template.md) and directory forms (ISSUE_TEMPLATE/, PULL_REQUEST_TEMPLATE/, GitLab issue_templates/ and merge_request_templates/) are picked up. The issue chooser config.yml is reported separately under templates.config since it is not itself a template. GitLab merge request templates are folded into pull_request rather than getting their own field.

This is special-cased in the detection engine rather than driven by _resources.toml because the existing resource matcher returns a single path per field and skips directories, whereas templates are inherently a list and the directory form is the common case on GitHub.

Output looks like:

"resources": {
  "templates": {
    "issue": [
      ".github/ISSUE_TEMPLATE/bug.md",
      ".github/ISSUE_TEMPLATE/feature.yml"
    ],
    "pull_request": [
      ".github/PULL_REQUEST_TEMPLATE.md"
    ],
    "config": ".github/ISSUE_TEMPLATE/config.yml"
  }
}

Report issue and PR/MR templates under resources.templates so agents and
contributors know which templates to follow. Covers single-file and
directory forms across GitHub, GitLab, Gitea, and Forgejo locations,
with the issue chooser config.yml split out from actual templates.
@andrew andrew merged commit e0f265d into main May 13, 2026
8 checks passed
@andrew andrew deleted the detect-templates branch May 13, 2026 05:47
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.

1 participant