Skip to content

Commit 92f205e

Browse files
BagToadCopilot
andcommitted
docs(featuredetection): document GHES removal criteria for ApiActorsSupported
Expand the ApiActorsSupported doc comment to explain the two API generations (legacy AssignableUser vs actor-based AssignableActor), what each returns, and the specific GraphQL schema additions to check for when evaluating GHES support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ae5e857 commit 92f205e

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

internal/featuredetection/feature_detection.go

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,29 @@ type Detector interface {
2424

2525
type IssueFeatures struct {
2626
// TODO ApiActorsSupported
27-
// ApiActorsSupported indicates the host supports actor-based APIs
28-
// (replaceActorsForAssignable, requestReviewsByLogin, suggestedAssignableActors, etc.).
29-
// True for github.com and ghe.com. False for GHES.
30-
// Remove this flag once GHES supports these mutations, then collapse all
31-
// // TODO ApiActorsSupported sites to the actor-only path.
27+
// ApiActorsSupported indicates the host supports actor-based APIs. True for
28+
// github.com and ghe.com, false for GHES.
29+
//
30+
// The GitHub API has two generations of assignee/reviewer types:
31+
//
32+
// Legacy (GHES): Uses AssignableUser (users only) and node-ID-based mutations.
33+
// - assignableUsers query returns []AssignableUser
34+
// - Mutations take node IDs (assigneeIds, userReviewerIds, teamReviewerIds)
35+
//
36+
// Actor-based (github.com): Uses AssignableActor (User + Bot union) and
37+
// login-based mutations, enabling assignment of non-user actors like Copilot.
38+
// - suggestedActors query returns []AssignableActor (User | Bot)
39+
// - suggestedReviewerActors returns []ReviewerCandidate (User | Bot | Team)
40+
// - Mutations take logins (replaceActorsForAssignable, requestReviewsByLogin)
41+
//
42+
// When GHES adds support for the actor-based types and mutations, this flag
43+
// can be removed and all // TODO ApiActorsSupported sites collapsed to the
44+
// actor-only path. To verify GHES support, check whether the GHES GraphQL
45+
// schema includes:
46+
// - The suggestedActors field on Repository (assignee search)
47+
// - The suggestedReviewerActors field on PullRequest (reviewer search)
48+
// - The replaceActorsForAssignable mutation
49+
// - The requestReviewsByLogin mutation
3250
ApiActorsSupported bool
3351
}
3452

0 commit comments

Comments
 (0)