Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1601,6 +1601,7 @@ The behavior of lockdown mode depends on the tool invoked.
Following tools will return an error when the author lacks the push access:

- `issue_read:get`
- `issue_read:get_event`
- `pull_request_read:get`
- `pull_request_read:get_diff`
- `pull_request_read:get_files`
Expand All @@ -1610,6 +1611,8 @@ Following tools will filter out content from users lacking the push access:

- `issue_read:get_comments`
- `issue_read:get_sub_issues`
- `issue_read:get_events`
- `issue_read:get_timeline`
- `pull_request_read:get_comments`
- `pull_request_read:get_review_comments`
- `pull_request_read:get_reviews`
Expand Down
22 changes: 22 additions & 0 deletions docs/feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,28 @@ runtime behavior (such as output formatting) won't appear here.
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: The name of the repository (string, required)

### `issue_events`

- **issue_read** - Get issue details
- **OAuth Challenge Scopes**: `repo`
- `event_id`: The ID of the issue event. Required for, and only used by, the get_event method. (number, optional)
- `issue_number`: The number of the issue. Required for every method except get_event. (number, optional)
- `method`: The read operation to perform on a single issue.
Options are:
1. get - Get issue details. Also returns best-effort hierarchy flags (`has_parent`, `has_children`); `parent` and `sub_issues_summary` are optional relationship summaries, and `closed_by_pull_requests` summarizes the pull requests configured to close the issue as `total_count` plus up to 5 `references`.
2. get_comments - Get issue comments.
3. get_sub_issues - Get sub-issues (children) of the issue.
4. get_parent - Get the parent issue, if this issue is a sub-issue of another.
5. get_labels - Get labels assigned to the issue.
6. get_events - Get the issue's event history: labeled, assigned, closed, renamed, referenced and so on.
7. get_timeline - Get the issue's timeline. A superset of get_events that also includes comments, commits and reviews, so prefer it when you need the full narrative and get_events when you only need state changes.
8. get_event - Get a single issue event by its `event_id`. Takes `event_id` instead of `issue_number`.
(string, required)
- `owner`: The owner of the repository (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: The name of the repository (string, required)

### `thread_resolution_reason`

- **pull_request_review_write** - Write operations (create, submit, delete) on pull request reviews
Expand Down
60 changes: 60 additions & 0 deletions pkg/github/__toolsnaps__/issue_read_ff_issue_events.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"annotations": {
"idempotentHint": false,
"readOnlyHint": true,
"title": "Get issue details"
},
"description": "Get information about a specific issue in a GitHub repository.",
"inputSchema": {
"properties": {
"event_id": {
"description": "The ID of the issue event. Required for, and only used by, the get_event method.",
"type": "number"
},
"issue_number": {
"description": "The number of the issue. Required for every method except get_event.",
"type": "number"
},
"method": {
"description": "The read operation to perform on a single issue.\nOptions are:\n1. get - Get issue details. Also returns best-effort hierarchy flags (`has_parent`, `has_children`); `parent` and `sub_issues_summary` are optional relationship summaries, and `closed_by_pull_requests` summarizes the pull requests configured to close the issue as `total_count` plus up to 5 `references`.\n2. get_comments - Get issue comments.\n3. get_sub_issues - Get sub-issues (children) of the issue.\n4. get_parent - Get the parent issue, if this issue is a sub-issue of another.\n5. get_labels - Get labels assigned to the issue.\n6. get_events - Get the issue's event history: labeled, assigned, closed, renamed, referenced and so on.\n7. get_timeline - Get the issue's timeline. A superset of get_events that also includes comments, commits and reviews, so prefer it when you need the full narrative and get_events when you only need state changes.\n8. get_event - Get a single issue event by its `event_id`. Takes `event_id` instead of `issue_number`.\n",
"enum": [
"get",
"get_comments",
"get_sub_issues",
"get_parent",
"get_labels",
"get_events",
"get_timeline",
"get_event"
],
"type": "string"
},
"owner": {
"description": "The owner of the repository",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "The name of the repository",
"type": "string"
}
},
"required": [
"method",
"owner",
"repo"
],
"type": "object"
},
"name": "issue_read"
}
8 changes: 8 additions & 0 deletions pkg/github/feature_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ const FeatureFlagIssueDependencies = "issue_dependencies"
// opt-in.
const FeatureFlagDuplicateDetection = "duplicate_detection"

// FeatureFlagIssueEvents is the feature flag name for the issue event history
// methods on issue_read (get_events, get_timeline, get_event), which expose an
// issue's event feed and timeline. It is gated so the extra methods and the
// event_id parameter are not advertised in the default issue_read schema,
// keeping the fixed tool-schema cost small unless explicitly opted in.
const FeatureFlagIssueEvents = "issue_events"

// FeatureFlagThreadResolutionReason exposes resolution reasons for Copilot review threads.
const FeatureFlagThreadResolutionReason = "thread_resolution_reason"

Expand All @@ -51,6 +58,7 @@ var AllowedFeatureFlags = []string{
FeatureFlagFileBlame,
FeatureFlagIssueDependencies,
FeatureFlagDuplicateDetection,
FeatureFlagIssueEvents,
FeatureFlagThreadResolutionReason,
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/github/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ const (
GetReposIssuesByOwnerByRepoByIssueNumber = "GET /repos/{owner}/{repo}/issues/{issue_number}"
GetReposIssuesCommentByOwnerByRepoByCommentID = "GET /repos/{owner}/{repo}/issues/comments/{comment_id}"
GetReposIssuesCommentsByOwnerByRepoByIssueNumber = "GET /repos/{owner}/{repo}/issues/{issue_number}/comments"
GetReposIssuesEventsByOwnerByRepoByIssueNumber = "GET /repos/{owner}/{repo}/issues/{issue_number}/events"
GetReposIssuesTimelineByOwnerByRepoByIssueNumber = "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"
GetReposIssuesEventByOwnerByRepoByEventID = "GET /repos/{owner}/{repo}/issues/events/{event_id}"
PostReposIssuesByOwnerByRepo = "POST /repos/{owner}/{repo}/issues"
PostReposIssuesCommentsByOwnerByRepoByIssueNumber = "POST /repos/{owner}/{repo}/issues/{issue_number}/comments"
PostReposIssuesReactionsByOwnerByRepoByIssueNumber = "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"
Expand Down
Loading