Community profile and issueTemplates do not report templates the community page counts #207706
Unanswered
jmrplens
asked this question in
Apps, API and Webhooks
Replies: 1 comment
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
API
Body
Summary
The community profile page marks "Issue templates" as added and scores the repository 100 %, while the two APIs that expose that fact answer as if the repository had none:
GET /repos/{owner}/{repo}/community/profilereturns"files": { "issue_template": null }Repository.issueTemplatesreturns[]Both happen when the templates live under
.github/ISSUE_TEMPLATE/as YAML issue forms, which is the format GitHub's own documentation recommends. The REST field is alsonullfor a directory of Markdown templates, so the two gaps are not the same gap.Reproduction
Repository:
jmrplens/gitlab-mcp-server(public)..github/ISSUE_TEMPLATE/holdsbug-report.yml,documentation.yml,enhancement.yml,feature-request.ymlandconfig.yml(blank_issues_enabled: false, one contact link).The community page, https://github.com/jmrplens/gitlab-mcp-server/community, shows the checklist complete, "Issue templates" with the green check, and 100 %.
REST:
{ "health_percentage": 100, "issue_template": null }GraphQL:
{ repository(owner: "jmrplens", name: "gitlab-mcp-server") { issueTemplates { name filename } } }{ "data": { "repository": { "issueTemplates": [] } } }The same happens on
jmrplens/phonometry(four YAML forms, 100 %,null,[]).What each API does report
Measured against public repositories with the other template layouts, same day:
files.issue_templateissueTemplatesjmrplens/gitlab-mcp-server.github/ISSUE_TEMPLATE/*.yml(forms)null[]cli/cli.github/ISSUE_TEMPLATE/*.md(3 Markdown)nullCocoaPods/CocoaPods.github/ISSUE_TEMPLATE.md(single file)github/gh-ost.github/ISSUE_TEMPLATE.md(single file)[]So:
files.issue_templateis non-null only for the legacy single file.github/ISSUE_TEMPLATE.md. A directory of templates, Markdown or YAML, givesnulleven though the page and the score count it. The endpoint's documentation says it reports "the presence of ISSUE_TEMPLATE, PULL_REQUEST_TEMPLATE, README, and CONTRIBUTING files", which a reader takes to mean the same presence the page shows.issueTemplateslists Markdown templates in the directory but not YAML issue forms, and not the legacy single file either (github/gh-osthas one and gets[]).Why it matters
Anything that reads the community profile through the API concludes that a repository following the current recommendation (issue forms) has no issue templates, and cannot reconcile that with the 100 % the same response carries. The only way to get the truth today is to list
.github/ISSUE_TEMPLATE/through the contents API or a GraphQLTreeand count entries other thanconfig.yml, which is what I ended up doing.Ask
files.issue_templatereflect the same detection the community page andhealth_percentageuse (a directory of templates counts), or document that the field only reports the single legacy file.Repository.issueTemplates(anIssueTemplatetoday carriesname,title,body,filename,about,assignees,labels; a form would fit withbodyempty or as a newIssueFormtype), and the legacy single file for consistency with REST.The REST half is also filed against the OpenAPI description, so the field can at least document the limitation: github/rest-api-description#7187.
All reactions