docs(api): document what the ci application key scope actually grants - #12366
Conversation
Merge Protections🟢 All 6 merge protections satisfied — ready to merge. Show 6 satisfied protections🟢 🤖 Continuous Integration
🟢 👀 Review Requirements
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 Reviews
🟢 📕 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
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/usageto documentcivsadminscope behavior and refreshes theGET /v1/applicationexample. - Clarifies in
/securitythat 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
ciapplication 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.
Revision history
|
a416d9d to
122cf92
Compare
122cf92 to
73135b3
Compare
73135b3 to
2d72d85
Compare
2d72d85 to
a3fbbfe
Compare
a3fbbfe to
b730ae2
Compare
b730ae2 to
0e98404
Compare
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
0e98404 to
fe6c15b
Compare
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
|
The
ciscope was one line about uploading test results and CI Insightsdata. A
cikey also quarantines and unquarantines tests, which decideswhether 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
cikey and rewrote both scopebullets from that set. The
adminbullet was wrong too: it claimed fullaccess to all API endpoints, but the results upload and the Merge Queue
Scopes call accept a
cikey only.Two other errors on the page, found while checking the above:
GET /v1/applicationresponse example was stale: the API returns aUUID
id, ascopefield andaccount_scope, not an integeridanda
github_accountobject.GET /v1/application, the one endpoint onthe page that rejects PATs.
merge-queue/scopes.mdxshowed its curl with a generic application key,where only a
cikey works.Fixes MRGFY-8645