Skip to content

feat(notion): Support {linear_url} placeholder in template_markdown#237

Merged
rgibert merged 1 commit into
mainfrom
rgibert/notion-template-linear-url
Jun 4, 2026
Merged

feat(notion): Support {linear_url} placeholder in template_markdown#237
rgibert merged 1 commit into
mainfrom
rgibert/notion-template-linear-url

Conversation

@rgibert

@rgibert rgibert commented Jun 4, 2026

Copy link
Copy Markdown
Member

Add variable interpolation to template_markdown so the static action items table can be replaced with a link to the parent Linear issue.

apply_template now accepts an optional incident parameter. Before sending the template to Notion, _render_template replaces {linear_url} with the incident's Linear external link URL. When no incident is provided (or no placeholder exists), the template passes through unchanged.

This lets the TOML config use e.g. [Create action items in Linear]({linear_url}) instead of a manually-maintained markdown table that duplicates the UI.

Resolves RELENG-543

Agent transcript: https://claudescope.sentry.dev/share/iAb7L5llLlNhVBIBHlJ8tQk5jJvt8ztyeEBFS9KubJg

Allow template_markdown to interpolate incident data so that the
action items table can be replaced with a link to the parent Linear
issue. The only supported placeholder for now is {linear_url}.

Co-Authored-By: Claude <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/9G_FB_aO2l785A6uYLrBqhpbxFaV1WKtyjyYaeMwF-Q
@rgibert rgibert marked this pull request as ready for review June 4, 2026 15:41
@rgibert rgibert requested a review from a team as a code owner June 4, 2026 15:42
@linear-code

linear-code Bot commented Jun 4, 2026

Copy link
Copy Markdown

RELENG-543

@rgibert rgibert self-assigned this Jun 4, 2026
@rgibert rgibert enabled auto-merge (squash) June 4, 2026 15:48
if incident is None:
return template
linear_url = incident.external_links_dict.get("linear", "")
return template.replace("{linear_url}", linear_url)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

easy peasy nice

@rgibert rgibert merged commit e826d57 into main Jun 4, 2026
38 checks passed
@rgibert rgibert deleted the rgibert/notion-template-linear-url branch June 4, 2026 17:38
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.

2 participants