docs(conditions): split GitHub-sourced attributes into their own section#11993
Conversation
|
This pull request is part of a Mergify stack:
|
Merge Protections🔴 2 of 6 protections blocking · waiting on 👀 reviews
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
Show 4 satisfied protections🟢 🤖 Continuous Integration
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
Pull request overview
This PR updates the conditions documentation to separate pull request attributes into “Mergify” vs “GitHub-sourced (read-only)” sections, and adds a small metadata accessor to let both the Markdown generator and the React table filter attributes by provenance.
Changes:
- Add
getAttributeSource()to readx-mergify-attribute-metadata.sourcefrom schema definitions. - Filter/partition pull request attributes by source in both
schemaToMarkdownand thePullRequestAttributesReact table. - Update
conditions.mdxto render two attribute tables, with tests covering the new filtering behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/util/schemaToMarkdown.ts | Adds source filtering when generating the pull request attributes markdown table and supports <PullRequestAttributesTable source="..."> replacement. |
| src/util/schemaToMarkdown.test.ts | Adds unit tests ensuring default output excludes GitHub-sourced attributes and that source="github" includes only those. |
| src/util/attributeMetadata.ts | Introduces getAttributeSource() to read attribute provenance from schema metadata. |
| src/util/attributeMetadata.test.ts | Adds tests for getAttributeSource() behavior across valid/malformed inputs. |
| src/content/docs/configuration/conditions.mdx | Splits “Attributes List” into Mergify vs GitHub rulesets/branch protection attributes and renders both tables. |
| src/components/Tables/PullRequestAttributes.tsx | Adds optional source prop and filters the rendered attribute set accordingly when not given staticAttributes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d318936 to
89d432b
Compare
Revision history
|
|
@JulianMaurin this pull request is now in conflict 😩 |
The attributes list now has two subsections under "Attributes List": Mergify attributes and GitHub rulesets and branch protection attributes. The latter holds the attributes carrying x-mergify-attribute-metadata.source = "github" — read-only values Mergify loads from GitHub that cannot be set in the configuration. A getAttributeSource() accessor reads the schema metadata; both render paths (the PullRequestAttributes React table and the schemaToMarkdown generator) partition on it through an optional source filter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Change-Id: I200fc09a8c36b3c3ec357b69ef44157257abe3c8
89d432b to
42f1b5e
Compare
The attributes list now has two subsections under "Attributes List": Mergify
attributes and GitHub rulesets and branch protection attributes. The latter
holds the attributes carrying x-mergify-attribute-metadata.source = "github" —
read-only values Mergify loads from GitHub that cannot be set in the
configuration.
A getAttributeSource() accessor reads the schema metadata; both render paths
(the PullRequestAttributes React table and the schemaToMarkdown generator)
partition on it through an optional source filter.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com