-
Notifications
You must be signed in to change notification settings - Fork 425
docs: surface allowed-teams in agentic mentions config docs
#40421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -142,11 +142,16 @@ description: Safe-output reference for runtime defaults, custom jobs, scripts, a | |
| allow-team-members: true # Allow repository collaborators (default: true) | ||
| allow-context: true # Allow mentions from event context (default: true) | ||
| allowed: [copilot, user1] # Always allow specific users/bots | ||
| allowed-teams: # Allow all members of named GitHub teams | ||
| - myorg/eng # org/team-slug format (cross-org) | ||
| - reviewers # bare team-slug (uses current repo's org) | ||
| max: 50 # Maximum mentions per message (default: 50) | ||
| ``` | ||
|
|
||
| - Team members include collaborators with any permission level (excluding bots unless explicitly listed) | ||
| - Context mentions include issue/PR authors, assignees, and commenters | ||
| - `allowed-teams` resolves team membership from the GitHub API at runtime; bot accounts are excluded. Use `org/team-slug` for cross-org teams or a bare `team-slug` to resolve against the current repository's organization. | ||
|
Comment on lines
151
to
+153
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💡 Suggested fixThe current prose:
Should read something like:
The inline YAML comment on the Why it matters for agents: An agent following this doc will only use |
||
| - **`allowed-teams` requires `read:org` scope.** The default `GITHUB_TOKEN` does **not** include this scope. Provide a classic PAT with `read:org`, a fine-grained PAT with the "Members" permission (read), or a GitHub App installation token with the "Members" permission (read) via `safe-outputs.github-token:` or `safe-outputs.github-app:`. If the token lacks the required scope, team lookup fails with a warning and the workflow continues without those team members in the allowlist. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [/grill-with-docs] This bullet does a lot of work in one sentence: scope requirement, GITHUB_TOKEN limitation, three token alternatives, and graceful-degradation behaviour. Consider splitting it for easier agent and human parsing.\n\n \n
💡 Suggested split\n\nmarkdown\n - **`allowed-teams` requires `read:org` scope.** The default `GITHUB_TOKEN` does **not** include this scope; supply a classic PAT with `read:org`, a fine-grained PAT with the "Members" permission (read), or a GitHub App installation token with the "Members" permission (read) via `safe-outputs.github-token:` or `safe-outputs.github-app:`.\n - If the token lacks `read:org`, team lookup fails with a warning and the workflow continues without those team members in the allowlist (graceful degradation).\n\n\nThis mirrors the existing doc style where requirement and fallback behaviour are separate bullets.\n\n
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Three precision gaps in the scope/permissions caveat sentence that will cause agents to misread this when creating tokens or diagnosing failures. 💡 Breakdown and suggested fix1. The sentence leads with " Suggested split:
2. Fine-grained PAT "Members" needs "organization-level" qualifier GitHub fine-grained PATs separate repository-level and organization-level permissions. "Members" exists only under organization permissions, not repository permissions. Without the qualifier, an agent enabling permissions for a fine-grained PAT will look in the wrong section. 3. Graceful degradation is stated only for scope failure, not team-not-found
This implies graceful degradation is scoped only to auth failures. A typo in a team slug ( |
||
| - `runs-on:` - Runner specification for all safe-outputs jobs (string) | ||
| - Defaults to `ubuntu-slim` (1-vCPU runner) | ||
| - Examples: `ubuntu-latest`, `windows-latest`, `self-hosted` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/grill-with-docs] The
(cross-org)label is slightly misleading:org/team-slugis the fully-qualified form that works for any org, not only cross-organization ones — you'd writemyorg/engeven when your repo already lives inmyorg.\n\n💡 Suggested wording
\n\nyaml\n - myorg/eng # fully-qualified form (works for any org)\n - reviewers # bare team-slug (resolves against current repo's org)\n\n\nThe current(cross-org)label could lead an agent to believeorg/team-slugis only for cross-organization scenarios, rather than the general explicit-qualifier form.\n\n