Skip to content

Question: Are the 0.23 PR variables supported by Knope Bot? #1976

Description

@pujitm

Summary

I may be misunderstanding how the Knope 0.23 release-note variables interact with the hosted Knope GitHub App.

I tried using $pr_author_login and $pr_number in change_templates. The Knope 0.23.0 CLI expands them during a dry-run, while the hosted bot writes them literally into its generated release pull request.

Could you help confirm whether these variables are expected to work with Knope Bot, or whether I am missing some bot-specific configuration?

Configuration

[bot.releases]
enabled = true

[github]
owner = "example"
repo = "example"

[release_notes]
change_templates = [
  "### $summary\n\nby @$pr_author_login in #$pr_number\n\n$details",
  "### $summary\n\nby @$pr_author_login\n\n$details",
  "### $summary\n\nby $commit_author_name\n\n$details",
  "### $summary\n\n$details",
  "* $summary by @$pr_author_login in #$pr_number",
  "* $summary by @$pr_author_login",
  "* $summary by $commit_author_name",
  "* $summary",
]

Actual behavior

The bot-generated release notes contain literal output such as:

* Example change by @$pr_author_login in #$pr_number

The bot reacts promptly to repository changes and refreshes the release pull request, so the installation and webhook processing appear to be working.

Removing the two PR variables causes the bot to use the compatible $commit_author_name templates correctly.

Expected behavior

If these variables are supported by Knope Bot, I expected PR-backed changes to render like:

* Example change by @contributor in #123

When PR metadata is unavailable, I expected the bot to skip the inapplicable template and use the next compatible fallback, matching the behavior I see with the Knope 0.23 CLI.

Local reproduction

Using the same repository state and configuration:

  • Knope 0.22.4 renders $pr_author_login and $pr_number literally.
  • Knope 0.23.0 expands them during a dry-run.
  • The hosted bot's output matches the first behavior.

Knope 0.23.0 release:
https://github.com/knope-dev/knope/releases/tag/knope/v0.23.0

Feature implementation:
#1904

What I may be misunderstanding

I may be assuming incorrectly that release-note variables documented for Knope 0.23 also apply to the hosted GitHub App. The documentation describes the GitHub-backed variables in the context of Knope CLI, so it is possible that bot support is separate, requires different configuration, or is not currently intended.

I also may have ordered the fallback templates incorrectly or missed a required bot-specific setting. I would appreciate guidance if this configuration is not the expected way to use these variables with Knope Bot.

Questions

  1. Are $pr_author_login and $pr_number currently supported by Knope Bot?
  2. If so, is there any additional configuration or installation step required?
  3. If they are currently CLI-only, could the documentation clarify that distinction?

Thanks for taking a look.

AI disclosure: I used OpenAI Codex to help investigate the behavior and draft this report. I reviewed the reproduction and final text and take responsibility for its contents.

— Pujit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions