Skip to content

docs(api): document what the ci application key scope actually grants - #12366

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83
Aug 13, 2026
Merged

docs(api): document what the ci application key scope actually grants#12366
mergify[bot] merged 1 commit into
mainfrom
devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83

Conversation

@sileht

@sileht sileht commented Aug 12, 2026

Copy link
Copy Markdown
Member

The ci scope was one line about uploading test results and CI Insights
data. A ci key also quarantines and unquarantines tests, which decides
whether a failing test blocks a merge, and it works on every repository of
the account with no GitHub repository role attached. A customer handing
that key to their pipeline had no way to know.

Audited the engine routes that accept a ci key and rewrote both scope
bullets from that set. The admin bullet was wrong too: it claimed full
access to all API endpoints, but the results upload and the Merge Queue
Scopes call accept a ci key only.

Two other errors on the page, found while checking the above:

  • The GET /v1/application response example was stale: the API returns a
    UUID id, a scope field and account_scope, not an integer id and
    a github_account object.
  • The GitHub PAT example called GET /v1/application, the one endpoint on
    the page that rejects PATs.

merge-queue/scopes.mdx showed its curl with a generic application key,
where only a ci key works.

Fixes MRGFY-8645

Copilot AI lite review requested due to automatic review settings August 12, 2026 17:53
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 17:53 Failure
@mergify

mergify Bot commented Aug 12, 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]
    • all of:
      • author = mergify-ci-bot
      • -head ~= ^docs-agent/

🟢 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)(?:\(.+\))?!?:

🟢 🔎 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.

@mergify
mergify Bot requested a review from a team August 12, 2026 17:54

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

Updates the documentation to accurately describe what Mergify application key scopes (especially ci) allow, and clarifies how application keys relate to GitHub roles and owner requirements across the docs site.

Changes:

  • Expands /api/usage to document ci vs admin scope behavior and refreshes the GET /v1/application example.
  • Clarifies in /security that application keys are not governed by GitHub repository roles (and tightens the “Owner” requirement wording).
  • Notes on Merge Queue scopes that the relevant REST endpoint requires a ci application key.

Reviewed changes

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

File Description
src/content/docs/security.mdx Clarifies access-control model for users vs application keys, and refines Owner-role wording for creating admin keys.
src/content/docs/merge-queue/scopes.mdx Documents that setting merge queue scopes via API requires a ci application key (and that admin is rejected).
src/content/docs/api/usage.mdx Expands application key scope documentation and updates API response / PAT examples to match current behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/content/docs/security.mdx Outdated
Comment thread src/content/docs/security.mdx Outdated
Comment thread src/content/docs/api/usage.mdx Outdated
@sileht

sileht commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

Revision history

# Type Changes Reason Date
1 initial a416d9d 2026-08-12 17:59 UTC
2 content a416d9d → 122cf92 2026-08-12 17:59 UTC
3 content 122cf92 → 73135b3 2026-08-12 18:27 UTC
4 content 73135b3 → 2d72d85 2026-08-12 18:32 UTC
5 content 2d72d85 → a3fbbfe 2026-08-12 18:42 UTC
6 content a3fbbfe → b730ae2 2026-08-12 19:02 UTC
7 content b730ae2 → 0e98404 2026-08-12 19:03 UTC
8 content 0e98404 → fe6c15b (raw) 2026-08-12 19:06 UTC

@sileht
sileht force-pushed the devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83 branch from a416d9d to 122cf92 Compare August 12, 2026 17:59
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 17:59 Failure
@sileht
sileht force-pushed the devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83 branch from 122cf92 to 73135b3 Compare August 12, 2026 18:27
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 18:27 Failure
@sileht
sileht force-pushed the devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83 branch from 73135b3 to 2d72d85 Compare August 12, 2026 18:32
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 18:32 Failure
@sileht
sileht force-pushed the devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83 branch from 2d72d85 to a3fbbfe Compare August 12, 2026 18:42
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 18:42 Failure
@sileht
sileht marked this pull request as ready for review August 12, 2026 19:00
@sileht
sileht force-pushed the devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83 branch from a3fbbfe to b730ae2 Compare August 12, 2026 19:02
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 19:03 Failure
@sileht
sileht force-pushed the devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83 branch from b730ae2 to 0e98404 Compare August 12, 2026 19:03
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 19:04 Failure
The `ci` scope was one line about uploading test results and CI Insights
data. A `ci` key also quarantines and unquarantines tests, which decides
whether a failing test blocks a merge, and it works on every repository of
the account with no GitHub repository role attached. A customer handing
that key to their pipeline had no way to know.

Audited the engine routes that accept a `ci` key and rewrote both scope
bullets from that set. The `admin` bullet was wrong too: it claimed full
access to all API endpoints, but the results upload and the Merge Queue
Scopes call accept a `ci` key only.

Two other errors on the page, found while checking the above:

- The `GET /v1/application` response example was stale: the API returns a
  UUID `id`, a `scope` field and `account_scope`, not an integer `id` and
  a `github_account` object.
- The GitHub PAT example called `GET /v1/application`, the one endpoint on
  the page that rejects PATs.

`merge-queue/scopes.mdx` showed its curl with a generic application key,
where only a `ci` key works.

Fixes MRGFY-8645

Change-Id: Ib2790d83483a3d371b595eca06742a010d8ef087
@sileht
sileht force-pushed the devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83 branch from 0e98404 to fe6c15b Compare August 12, 2026 19:06
@mergify
mergify Bot deployed to Mergify Merge Protections August 12, 2026 19:06 Active
@mergify
mergify Bot requested a review from a team August 13, 2026 06:45
@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 3 minutes 35 seconds in the queue, including 2 minutes 2 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Aug 13, 2026
@mergify
mergify Bot merged commit 783ea3f into main Aug 13, 2026
10 checks passed
@mergify
mergify Bot deleted the devs/sileht/mrgfy-8645-document-ci-scope-capabilities/document-what-ci-app-key-scope-actually-grants--b2790d83 branch August 13, 2026 07:07
@mergify mergify Bot removed the queued label Aug 13, 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