Skip to content

Support org-level issue templates from .github repo #430

@rhuss

Description

@rhuss

Problem

When assessing a repository that belongs to a GitHub organization, the issue_pr_templates check reports missing issue templates even when the organization has templates defined in its .github repository (e.g., <org>/.github/tree/main/.github/ISSUE_TEMPLATE).

GitHub supports organization-level issue templates that serve as defaults for all repositories in the organization. Repositories without their own .github/ISSUE_TEMPLATE/ directory inherit the org-level templates.

Example

The kagenti repository has no .github/ISSUE_TEMPLATE/ directory, but the organization defines templates at kagenti/.github. AgentReady scores this as missing templates.

Expected Behavior

The issue_pr_templates check should:

  1. First check the repository for .github/ISSUE_TEMPLATE/
  2. If not found, check whether the repository belongs to a GitHub organization
  3. If it does, check <org>/.github repository for .github/ISSUE_TEMPLATE/
  4. Score as passing if templates are found at either level

The GitHub API endpoint GET /repos/{owner}/.github/contents/.github/ISSUE_TEMPLATE can be used to check the org-level .github repo.

Current Behavior

Measured: PR:False, Issues:0 (Threshold: PR template + >= 2 issue templates)
- No issue template directory found

Environment

  • agentready version: 2.35.2
  • Repository: kagenti/kagenti (org with .github repo)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions