Skip to content

fix(registry): fix yank buildpack issue body template#2626

Open
AruneshDwivedi wants to merge 1 commit into
buildpacks:mainfrom
AruneshDwivedi:fix/yank-buildpack-template
Open

fix(registry): fix yank buildpack issue body template#2626
AruneshDwivedi wants to merge 1 commit into
buildpacks:mainfrom
AruneshDwivedi:fix/yank-buildpack-template

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

Summary

Fixes #2461. The pack buildpack yank command generated an invalid GitHub issue body — it was missing yank = true when the buildpack is yanked, and the body was missing triple backtick code block delimiters.

Root Cause

In internal/registry/registry_cache.go, the GithubIssueBodyTemplate had two bugs:

  1. When .Yanked is true, the template output nothing (empty {{ if .Yanked }}{{ else }}...)
  2. The template wasn't wrapped in triple backticks, so the issue body wasn't formatted as a code block

Fix

  • Changed {{ if .Yanked }}{{ else if .Address }} to {{ if .Yanked }}yank = true{{ else if .Address }}
  • Wrapped the template in triple backtick delimiters (```)

Testing

The generated issue body now correctly includes yank = true for yanked buildpacks and is properly wrapped in a code block.

@AruneshDwivedi AruneshDwivedi requested review from a team as code owners June 8, 2026 09:01
@github-actions github-actions Bot added this to the 0.41.0 milestone Jun 8, 2026
@github-actions github-actions Bot added the type/enhancement Issue that requests a new feature or improvement. label Jun 8, 2026
@AruneshDwivedi AruneshDwivedi force-pushed the fix/yank-buildpack-template branch from 0bbca00 to 031994d Compare June 8, 2026 13:09
The GithubIssueBodyTemplate was missing yank = true when Yanked is true,
and was missing triple backtick code block delimiters. The template now
correctly outputs 'yank = true' for yanked buildpacks and wraps the
body in triple backticks.

Fixes buildpacks#2461

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
Assisted-by: OWL
Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
@AruneshDwivedi AruneshDwivedi force-pushed the fix/yank-buildpack-template branch from 031994d to 879a65c Compare June 8, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement Issue that requests a new feature or improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pack buildpack yank command fails

1 participant