Skip to content

docs: document the variable-substitution templating language#11913

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/kozlek/docs/variable-substitution/document-var-substitution-templating-language--530a11f4
Jun 24, 2026
Merged

docs: document the variable-substitution templating language#11913
mergify[bot] merged 1 commit into
mainfrom
devs/kozlek/docs/variable-substitution/document-var-substitution-templating-language--530a11f4

Conversation

@kozlek

@kozlek kozlek commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Document each templated field's variable set as a named data type in
data-types.mdx (Message template, Copy title template, Copy body template,
Workflow input template), each rendering its variables from the JSON schema via a
new TemplateVariablesTable component that reads the x-mergify-template-variables
annotation. The simple-template field type in each action's Parameters table shows
its data-type title and links to it (getValueType: title->anchor, plus 'map of'
for the github_actions inputs map), so feature pages reference the variable set
rather than replicating a table. Adds a Variable substitution concept section with
a Jinja2 migration cheat-sheet, and re-scopes the legacy Jinja2 Template section to
the fields that still use it (post_check, merge).

Copilot AI review requested due to automatic review settings June 23, 2026 15:59
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 23, 2026 15:59 Failure
@mergify

mergify Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 6 merge protections satisfied — ready to merge.

Show 6 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 👀 Review Requirements

  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = mergify-ci-bot

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR documents Mergify’s new variable-substitution templating behavior in the docs and introduces a TemplateVariablesTable React component to render each templated field’s allowed variables directly from the configuration JSON schema.

Changes:

  • Adds a “Variable substitution” concept section to /configuration/data-types, including limitations and a short Jinja2 migration mapping.
  • Updates several workflow action pages to reference variable substitution and to render an “Available variables” table per field.
  • Adds schema-driven variable extraction/rendering utilities, and adjusts options-table rendering to avoid duplicating “Allowed variables” text.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/util/templateVariables.ts Adds recursive extraction of x-mergify-template-variables from JSON Schema fragments.
src/util/templateVariables.test.ts Adds Vitest coverage for the extractor across common schema shapes.
src/components/Tables/TemplateVariablesTable.tsx New table component to render published variables for a schema field.
src/components/Tables/OptionsTable.tsx Strips duplicated “Allowed variables” text for simple-template descriptions (now expected to be shown via the variables table).
src/components/Tables/ConfigOptions.tsx Links simple-template value types to the new docs concept section.
src/content/docs/configuration/data-types.mdx Adds “Variable substitution” section and clarifies that Jinja2 remains only for specific fields.
src/content/docs/workflow/actions/comment.mdx Adds “Available variables” section and Jinja2 deprecation note for message.
src/content/docs/workflow/actions/review.mdx Adds “Available variables” section and Jinja2 deprecation note for message.
src/content/docs/workflow/actions/close.mdx Adds “Available variables” section and Jinja2 deprecation note for message.
src/content/docs/workflow/actions/copy.mdx Updates templating guidance and adds variable table + deprecation note for title/body.
src/content/docs/workflow/actions/backport.mdx Updates templating guidance and examples; adds variable table + deprecation note for title/body.
src/content/docs/workflow/actions/github_actions.mdx Adds variable table + deprecation note for templated workflow inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/Tables/TemplateVariablesTable.tsx
Comment thread src/components/Tables/TemplateVariablesTable.tsx Outdated
Comment thread src/components/Tables/OptionsTable.tsx
Comment thread src/content/docs/workflow/actions/review.mdx Outdated
Comment thread src/content/docs/workflow/actions/comment.mdx Outdated
Comment thread src/content/docs/workflow/actions/backport.mdx Outdated
Comment thread src/content/docs/configuration/data-types.mdx Outdated
Comment thread src/content/docs/configuration/data-types.mdx Outdated
Comment thread src/content/docs/configuration/data-types.mdx Outdated
Comment thread src/content/docs/configuration/data-types.mdx
@kozlek kozlek force-pushed the devs/kozlek/docs/variable-substitution/document-var-substitution-templating-language--530a11f4 branch from 9d6355c to 82d1dc7 Compare June 23, 2026 16:10
@kozlek

kozlek commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 9d6355c 2026-06-23 16:10 UTC
2 content 9d6355c → 82d1dc7 (raw) 2026-06-23 16:10 UTC
3 content 82d1dc7 → 01457dd (raw) 2026-06-24 07:36 UTC
4 content 01457dd → 0e1688c (raw) 2026-06-24 10:00 UTC
5 content 0e1688c → 428c7da (raw) 2026-06-24 12:57 UTC
6 rebase 428c7da → 2128558 (rebase only) 2026-06-24 13:20 UTC

@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 23, 2026 16:11 Failure
@mergify mergify Bot requested a review from a team June 23, 2026 16:13
Comment thread src/content/docs/configuration/data-types.mdx Outdated
@mergify mergify Bot requested a review from a team June 23, 2026 18:26
Comment thread src/content/docs/workflow/actions/backport.mdx Outdated
@mergify mergify Bot requested a review from a team June 23, 2026 18:27
@kozlek kozlek force-pushed the devs/kozlek/docs/variable-substitution/document-var-substitution-templating-language--530a11f4 branch from 82d1dc7 to 01457dd Compare June 24, 2026 07:36
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 24, 2026 07:36 Failure
@kozlek kozlek force-pushed the devs/kozlek/docs/variable-substitution/document-var-substitution-templating-language--530a11f4 branch from 01457dd to 0e1688c Compare June 24, 2026 10:00
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 24, 2026 10:00 Failure
@kozlek kozlek force-pushed the devs/kozlek/docs/variable-substitution/document-var-substitution-templating-language--530a11f4 branch from 0e1688c to 428c7da Compare June 24, 2026 12:57
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 24, 2026 12:57 Failure
@kozlek kozlek marked this pull request as ready for review June 24, 2026 13:02
@kozlek kozlek requested a review from jd June 24, 2026 13:02
Document each templated field's variable set as a named data type in
data-types.mdx (Message template, Copy title template, Copy body template,
Workflow input template), each rendering its variables from the JSON schema via a
new TemplateVariablesTable component that reads the x-mergify-template-variables
annotation. The simple-template field type in each action's Parameters table shows
its data-type title and links to it (getValueType: title->anchor, plus 'map of'
for the github_actions inputs map), so feature pages reference the variable set
rather than replicating a table. Adds a Variable substitution concept section with
a Jinja2 migration cheat-sheet, and re-scopes the legacy Jinja2 Template section to
the fields that still use it (post_check, merge).

Change-Id: I530a11f43adb18ff3fdc964199e00d52d105a2b7
@kozlek kozlek force-pushed the devs/kozlek/docs/variable-substitution/document-var-substitution-templating-language--530a11f4 branch from 428c7da to 2128558 Compare June 24, 2026 13:20
@kozlek

kozlek commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 docs: document the variable-substitution templating language #11913 👈
2 docs: clarify assignees and bot_account accept a login or the author shortcut #11926

@mergify mergify Bot requested a review from a team June 24, 2026 14:01
@mergify

mergify Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 2 minutes 38 seconds in the queue, including 1 minute 59 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Jun 24, 2026
@mergify mergify Bot merged commit 43931e0 into main Jun 24, 2026
8 of 13 checks passed
@mergify mergify Bot deleted the devs/kozlek/docs/variable-substitution/document-var-substitution-templating-language--530a11f4 branch June 24, 2026 15:26
@mergify mergify Bot removed the queued label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants