-
Notifications
You must be signed in to change notification settings - Fork 828
[fix] kimi_cli failed to find CHANGELOG.md #1277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,7 +39,8 @@ def commit(): | |
| norm_entries = [ | ||
| line.strip()[2:].strip() for line in bullet_lines if line.strip().startswith("- ") | ||
| ] | ||
| result[current_ver] = ReleaseEntry(description=description, entries=norm_entries) | ||
| result[current_ver] = ReleaseEntry( | ||
| description=description, entries=norm_entries) | ||
|
|
||
| for raw in lines: | ||
| line = raw.rstrip() | ||
|
|
@@ -103,6 +104,17 @@ def format_release_notes(changelog: dict[str, ReleaseEntry], include_lib_changes | |
| return "\n".join(parts).strip() | ||
|
|
||
|
|
||
| CHANGELOG = parse_changelog( | ||
| (Path(__file__).parent.parent / "CHANGELOG.md").read_text(encoding="utf-8") | ||
| ) | ||
| _cached_changelog: dict[str, ReleaseEntry] | None = None | ||
|
|
||
|
|
||
| def get_changelog() -> dict[str, ReleaseEntry]: | ||
| """Lazily load and parse the changelog on first access.""" | ||
| global _cached_changelog | ||
| if _cached_changelog is None: | ||
| path = Path(__file__).parent.parent / "CHANGELOG.md" | ||
| try: | ||
| _cached_changelog = parse_changelog( | ||
| path.read_text(encoding="utf-8")) | ||
| except FileNotFoundError: | ||
| _cached_changelog = {} | ||
| return _cached_changelog | ||
|
Comment on lines
+109
to
+119
|
||
Uh oh!
There was an error while loading. Please reload this page.