Skip to content

docs(conditions): split GitHub-sourced attributes into their own section#11993

Open
JulianMaurin wants to merge 1 commit into
mainfrom
devs/JulianMaurin/github-sourced-attributes/split-github-sourced-attributes-their-own-section--200fc09a
Open

docs(conditions): split GitHub-sourced attributes into their own section#11993
JulianMaurin wants to merge 1 commit into
mainfrom
devs/JulianMaurin/github-sourced-attributes/split-github-sourced-attributes-their-own-section--200fc09a

Conversation

@JulianMaurin

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings June 30, 2026 09:13
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 30, 2026 09:13 Failure
@JulianMaurin

JulianMaurin commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 docs(conditions): split GitHub-sourced attributes into their own section #11993 👈
2 docs(conditions): add per-row anchors to the attributes tables #11994

@mergify

mergify Bot commented Jun 30, 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|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 June 30, 2026 09:15

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 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 read x-mergify-attribute-metadata.source from schema definitions.
  • Filter/partition pull request attributes by source in both schemaToMarkdown and the PullRequestAttributes React table.
  • Update conditions.mdx to 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.

Comment thread src/util/schemaToMarkdown.ts Outdated
Comment thread src/components/Tables/PullRequestAttributes.tsx Outdated
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/github-sourced-attributes/split-github-sourced-attributes-their-own-section--200fc09a branch from d318936 to 89d432b Compare July 1, 2026 12:27
@JulianMaurin

JulianMaurin commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial d318936 2026-07-01 12:27 UTC
2 content d318936 → 89d432b (raw) 2026-07-01 12:27 UTC
3 content 89d432b → 42f1b5e rebase on main: resolve conflict in PullRequestAttributes.tsx — combine new condition operator/modifier columns with source-based filtering 2026-07-01 12:45 UTC

@mergify mergify Bot had a problem deploying to Mergify Merge Protections July 1, 2026 12:28 Failure
@mergify

mergify Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@JulianMaurin this pull request is now in conflict 😩

@mergify mergify Bot added the conflict label Jul 1, 2026
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
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/github-sourced-attributes/split-github-sourced-attributes-their-own-section--200fc09a branch from 89d432b to 42f1b5e Compare July 1, 2026 12:45
@mergify mergify Bot had a problem deploying to Mergify Merge Protections July 1, 2026 12:46 Failure
@mergify mergify Bot removed the conflict label Jul 1, 2026
@JulianMaurin JulianMaurin marked this pull request as ready for review July 1, 2026 12:54
@mergify mergify Bot requested a review from a team July 1, 2026 19:23
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.

3 participants