Skip to content

fix: pin prompt URLs to version tag instead of main branch#191

Merged
jamesadevine merged 1 commit into
mainfrom
fix/pin-prompt-urls-to-version-tag
Apr 14, 2026
Merged

fix: pin prompt URLs to version tag instead of main branch#191
jamesadevine merged 1 commit into
mainfrom
fix/pin-prompt-urls-to-version-tag

Conversation

@jamesadevine

Copy link
Copy Markdown
Collaborator

Problem

The init command generates agent files (.github/agents/ado-aw.agent.md) that reference prompt URLs pointing at the main branch. If prompt files are moved or renamed in the future, all previously deployed agent files would silently break.

Solution

Replace main with v{{ compiler_version }} in all prompt and AGENTS.md URLs within the init-agent template and the console output hint. This pins each deployed agent file to the exact release version that generated it.

This leverages the existing {{ compiler_version }} substitution mechanism — the same one already used for binary download URLs in the same template.

Changed files

File Change
templates/init-agent.md 4 URLs pinned: 3 prompt files + AGENTS.md
src/init.rs Console-printed URL now uses compiled version

Example

Before:

https://raw.githubusercontent.com/githubnext/ado-aw/main/prompts/create-ado-agentic-workflow.md

After (ado-aw init at version 0.13.0):

https://raw.githubusercontent.com/githubnext/ado-aw/v0.13.0/prompts/create-ado-agentic-workflow.md

The init command generates agent files that reference prompts via
raw.githubusercontent.com URLs pointing at the main branch. If files
are moved or renamed, all previously deployed agent files break.

Replace "main" with "v{{ compiler_version }}" in all prompt and
AGENTS.md URLs within the init-agent template and the console output
hint. This leverages the existing version substitution mechanism and
is consistent with how binary download URLs are already pinned.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine merged commit 1f3b6da into main Apr 14, 2026
4 checks passed
@jamesadevine jamesadevine deleted the fix/pin-prompt-urls-to-version-tag branch April 14, 2026 14:01
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Rust PR Review

Summary: Looks good — clean, minimal change that correctly extends an existing substitution pattern.

Findings

✅ What Looks Good

  • The {{ compiler_version }} substitution is already wired in init.rs via .replace("{{ compiler_version }}", version) — the template changes plug into this mechanism correctly with no additional code required.
  • The println! in init.rs correctly uses Rust 1.58+ captured identifier syntax ({version}) with the in-scope let version = env!("CARGO_PKG_VERSION") — this is idiomatic.
  • All four relevant URLs in templates/init-agent.md are updated (3 prompt files + AGENTS.md), consistent with the PR description.
  • The v prefix is correctly hardcoded in the URL (e.g. v{{ compiler_version }}v0.13.0), matching the tag format used by the existing binary download URLs in the same template.

⚠️ Suggestions

  • .github/agents/agentic-workflows.agent.md (lines ~48–72): This committed agent file in the repo itself still references /main/ for all three prompt URLs. It won't be fixed automatically by this change since it's not regenerated by init. Worth regenerating it (or updating manually) so the repo's own agent is consistent with the new template.

Generated by Rust PR Reviewer for issue #191 · ● 383.1K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant