whyisjake / whyisjake/agentic-deployment-template

Agent-generated PR template's closing keyword isn't recognized by GitHub or the workflow's own PR-detection check

Open Beginner friendly
#34 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

agent-candidate
Dominant language
Shell
Stars
8
Forks
4
Avg merge
23m
Merged PRs (30d)
18

Description

Summary

The bundled PR template (.github/PULL_REQUEST_TEMPLATE/agent-generated.md) writes the issue-closing reference as:

**Closes:** #<issue number>

GitHub's closing-keyword parser doesn't recognize this form: bold markdown wraps Closes:, and a colon sits between the keyword and the #. A PR body that follows the template verbatim never gets linked as closing its issue — it shows up only as a cross-reference on the issue's timeline, and merging the PR will not auto-close the issue.

The same text also breaks the workflow's own "did this run produce a PR" check in .github/actions/claude-run/action.yml:

new RegExp(`(closes|fixes|resolves)\\s+#${n}\\b`, 'i').test(pr.body)

\s+ requires whitespace immediately after the keyword, but the template produces Closes:** #<n> — a colon and markdown asterisks in between — so this regex never matches either. Net effect: an agent run that opens a correctly-scoped PR following this template gets reported as "the agent ran, but produced no pull request," even though a PR exists and is complete.

Where this compounds

agent-ready-trigger.yml and plan-approval-gate.yml both instruct the agent, in their prompts, to reference the issue as the plain "Closes #<n>" — which is GitHub-recognized — but also tell it to use the PR template. An agent that follows the template literally (reasonable, since it's presented as the canonical format) ends up overriding the correct instruction with the broken one.

Suggested fix

Change the template's line to the plain, GitHub-recognized form:

Closes #<!-- issue number -->

That satisfies GitHub's own parser and both detection regexes, with no change needed elsewhere.

Acceptance Criteria

  • The agent-generated PR template is updated so that line 3 has Closes #<!-- issue number -->

In Scope

  • Only the agent-ready PR template at .github/PULL_REQUEST_TEMPLATE/agent-generated.md

Out of scope

  • Issue or PR templates other than the agent-ready PR template
  • The Github Actions workflows

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open .github/PULL_REQUEST_TEMPLATE/agent-generated.md and inspect line 3. Replace the bold, colon-separated closing reference with the exact plain Closes #<!-- issue number --> form described in the acceptance criteria. Confirm that only this template changes and that the resulting line matches the requested text.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
92/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.