gitea_issue_templates description names the wrong template directory #47

Open
opened 2026-10-24 10:57:57 +00:00 by dsh · 0 comments
Owner

Problem

The gitea_issue_templates tool definition says:

description: "List and validate standardized Gitea YAML issue templates from .gitea/ISSUE_TEMPLATE/."

but lib/issue-templates.js resolves the default directory as:

const TEMPLATE_DIR = fs.existsSync(ASSETS_TEMPLATE_DIR) ? ASSETS_TEMPLATE_DIR : GITEA_TEMPLATE_DIR

i.e. it prefers the plugin's bundled pack (assets/issue-templates/, the seven house forms) and only falls back to .gitea/ISSUE_TEMPLATE/ when the assets are absent. This checkout has assets/issue-templates/ (bug, feature, tech-debt, security, incident, research, config-change) and no .gitea/ directory at all, so the description points the model at the path that is not used.

Impact

An agent reading the tool description expects to manage the repository's own .gitea/ISSUE_TEMPLATE/ and can misreport where templates come from (or conclude a repo has none). The new README had to describe the real behaviour ("the plugin ships a house set; you can point it at another directory") instead of the schema text.

Expected

Describe the real default: "List and validate the bundled Gitea YAML issue-form pack (assets/issue-templates/), or the files in dir when given." Keep the optional dir parameter in the description.

Acceptance

  • lib/tool-defs/issues.js description names the bundled pack, not .gitea/ISSUE_TEMPLATE/.
  • A test asserts the default listing returns the seven shipped templates and that dir overrides it.
  • npm run check green.
## Problem The `gitea_issue_templates` tool definition says: ``` description: "List and validate standardized Gitea YAML issue templates from .gitea/ISSUE_TEMPLATE/." ``` but `lib/issue-templates.js` resolves the default directory as: ```js const TEMPLATE_DIR = fs.existsSync(ASSETS_TEMPLATE_DIR) ? ASSETS_TEMPLATE_DIR : GITEA_TEMPLATE_DIR ``` i.e. it prefers the plugin's **bundled pack** (`assets/issue-templates/`, the seven house forms) and only falls back to `.gitea/ISSUE_TEMPLATE/` when the assets are absent. This checkout has `assets/issue-templates/` (bug, feature, tech-debt, security, incident, research, config-change) and no `.gitea/` directory at all, so the description points the model at the path that is *not* used. ## Impact An agent reading the tool description expects to manage the repository's own `.gitea/ISSUE_TEMPLATE/` and can misreport where templates come from (or conclude a repo has none). The new README had to describe the real behaviour ("the plugin ships a house set; you can point it at another directory") instead of the schema text. ## Expected Describe the real default: "List and validate the bundled Gitea YAML issue-form pack (`assets/issue-templates/`), or the files in `dir` when given." Keep the optional `dir` parameter in the description. ## Acceptance - `lib/tool-defs/issues.js` description names the bundled pack, not `.gitea/ISSUE_TEMPLATE/`. - A test asserts the default listing returns the seven shipped templates and that `dir` overrides it. - `npm run check` green.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
dsh-plugins/dsh-gitea#47
No description provided.