Skip to content

feat: link typed template variables to their data type section#12145

Closed
kozlek wants to merge 1 commit into
mainfrom
devs/kozlek/docs/queue-dequeue-reason-type/link-typed-template-vars-their-data-type-section--b15295d0
Closed

feat: link typed template variables to their data type section#12145
kozlek wants to merge 1 commit into
mainfrom
devs/kozlek/docs/queue-dequeue-reason-type/link-typed-template-vars-their-data-type-section--b15295d0

Conversation

@kozlek

@kozlek kozlek commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Template variables whose value is drawn from an enumerated data type now
render as a link to the matching data-types section instead of as a
free-form string. The engine tags such variables with a type token in
x-mergify-template-variables; the docs map the token to its section
(currently queue_dequeue_reason -> Queue Dequeue Reason).

Keying off the schema-published token replaces the earlier hardcoded
variable-name special-case, so a future typed variable needs only its
engine annotation plus one entry in the docs token map.

The bundled schema update pre-syncs the marker ahead of the automated
JSON Schema sync; the bot will reconcile it identically once the engine
change lands.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Template variables whose value is drawn from an enumerated data type now
render as a link to the matching data-types section instead of as a
free-form string. The engine tags such variables with a `type` token in
`x-mergify-template-variables`; the docs map the token to its section
(currently `queue_dequeue_reason` -> Queue Dequeue Reason).

Keying off the schema-published token replaces the earlier hardcoded
variable-name special-case, so a future typed variable needs only its
engine annotation plus one entry in the docs token map.

The bundled schema update pre-syncs the marker ahead of the automated
JSON Schema sync; the bot will reconcile it identically once the engine
change lands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Change-Id: Ib15295d0fa731301b3b8d29b5af205df496f458a
Copilot AI review requested due to automatic review settings July 18, 2026 19:53
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections July 18, 2026 19:53 Failure
@mergify

mergify Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 2 of 6 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 👀 Review Requirements 👀 reviews
🔴 🔎 Reviews 👀 reviews
🟢 🤖 Continuous Integration
🟢 Enforce conventional commit
🟢 📕 PR description
🟢 🚦 Auto-queue

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = mergify-ci-bot

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

Show 4 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/

🟢 Enforce conventional commit

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

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

🟢 📕 PR description

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

🟢 🚦 Auto-queue

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

@mergify
mergify Bot requested a review from a team July 18, 2026 19:55

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 updates the docs rendering pipeline so template variables that are annotated in the JSON Schema as coming from an enumerated data type can be rendered as links to the corresponding Configuration Data Types section (currently queue-dequeue-reason).

Changes:

  • Extend TemplateVariable with an optional type token sourced from x-mergify-template-variables[].type.
  • Add a unit test to ensure the token is preserved by extractTemplateVariables.
  • Update TemplateVariablesTable to map known type tokens to /configuration/data-types#... anchors and render linked variables accordingly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/util/templateVariables.ts Adds optional type to the template variable shape; extraction continues to pass through schema-provided entries.
src/util/templateVariables.test.ts Adds coverage ensuring type is retained for typed/enumerated variables.
src/components/Tables/TemplateVariablesTable.tsx Introduces token→anchor mapping and renders typed variables as links to the matching data type section.
public/mergify-configuration-schema.json Annotates queue_dequeue_reason template variable entries with "type": "queue-dequeue-reason".

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

@kozlek kozlek closed this Jul 20, 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.

2 participants