MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / release_notes_call

Function release_notes_call

src/command_system/release_notes_command.py:20–45  ·  view source on GitHub ↗
(args: str, context: CommandContext)

Source from the content-addressed store, hash-verified

18
19
20def release_notes_call(args: str, context: CommandContext) -> LocalCommandResult:
21 # Lazy imports keep `import src.command_system` light (the established discipline).
22 from src import __version__
23 from src.utils.release_notes import (
24 format_release_notes_for_display,
25 get_release_notes_for_version,
26 get_release_tag_url,
27 normalize_public_version,
28 read_local_changelog,
29 )
30
31 # Normalize once and reuse for header + URL (TS interpolates the already-public
32 # build version; getReleaseTagUrl normalizes internally — identical result).
33 version = normalize_public_version(__version__)
34 notes = get_release_notes_for_version(version, read_local_changelog())
35 url = get_release_tag_url(version)
36 if notes:
37 return LocalCommandResult(
38 type="text",
39 value=(
40 f"Release notes for {version}:\n"
41 f"{format_release_notes_for_display(notes)}\n\n"
42 f"Full release page: {url}"
43 ),
44 )
45 return LocalCommandResult(type="text", value=f"Release notes: {url}")
46
47
48RELEASE_NOTES_COMMAND = LocalCommand(

Callers

nothing calls this directly

Calls 6

normalize_public_versionFunction · 0.90
read_local_changelogFunction · 0.90
get_release_tag_urlFunction · 0.90
LocalCommandResultClass · 0.85

Tested by

no test coverage detected