Skip to content
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

[BUG] Changelog command breaks on monorepo templates #388

Open
mewhhaha opened this issue May 15, 2024 · 1 comment · May be fixed by #391
Open

[BUG] Changelog command breaks on monorepo templates #388

mewhhaha opened this issue May 15, 2024 · 1 comment · May be fixed by #391
Assignees
Labels
bug Something isn't working

Comments

@mewhhaha
Copy link
Contributor

mewhhaha commented May 15, 2024

Describe the bug

cog 6.1.0 && main

I'm trying out cocogitto in a monorepo and when attempting to render the changelog with the changelog command cog changelog --template monorepo_default it fails saying that it is missing packages in the context. The same issue happens for the other monorepo templates.

I end up with the following error.

Error: Failed to render 'monorepo_default'

Caused by:
    Variable `packages` not found in context while rendering 'monorepo_default'

my configuration is the following.

from_latest_tag = true
ignore_merge_commits = false
disable_changelog = false
disable_bump_commit = false
generate_mono_repository_global_tag = true
branch_whitelist = []
skip_ci = "[skip ci]"
skip_untracked = false
pre_bump_hooks = []
post_bump_hooks = []
pre_package_bump_hooks = ["pnpm version {{version}}"]
post_package_bump_hooks = []

[changelog]
path = "CHANGELOG.md"
template = "monorepo_default"
authors = []

[packages]
# internal packages redacted

To Reproduce
Run cog changelog --template with a monorepo template.

cog changelog --template monorepo_default
cog changelog --template monorepo_full_hash

Expected behavior
Same changelog created through cog bump --auto or a partial one if using the --at flag.

Additional context
I'm trying to generate the latest changelog using "--at" for a pull request, and also for the release.

@mewhhaha mewhhaha added the bug Something isn't working label May 15, 2024
@oknozor oknozor pinned this issue May 15, 2024
@oknozor
Copy link
Collaborator

oknozor commented May 15, 2024

Hey @mewhhaha thanks for the report, I started a quick fix but note that it will need to be synced with #380 which is closely related to this issue.

@oknozor oknozor linked a pull request May 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants