You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 409db99
Browse filesBrowse the repository at this point in the historyBrowse files
committed
Add issue event history to issue_read behind a feature flag
With the issue_events feature flag on, issue_read gets three more
methods:
- get_events lists the issue's events: labeled, assigned, closed,
renamed and so on.
- get_timeline lists the timeline, which adds comments, commits,
reviews and cross-references to the events.
- get_event fetches one event by event_id.
The flag keeps the extra methods out of the default issue_read schema.
Responses are converted to MinimalIssueEvent and MinimalTimelineItem.
The timeline of github#211 (71 entries) goes from 172KB raw to 27KB.
Beyond the basic event fields, the minimal types keep:
- The issue, as a MinimalIssueRef, on get_event. The caller passes only
an event id, so this is the one place the response names the issue.
- commit_repository on timeline entries, parsed from commit_url.
Referenced and force-push entries often point at a commit in a fork
or another repo, and the SHA alone does not say which.
- The commit author and committer on committed entries, which have no
actor or user.
- The review's state, id, dismissal message and commit on
review_dismissed events.
Commit parents are dropped.
Bodies, commit messages and the dismissal message use sanitize.Content.
Titles use sanitize.PlainText. This matches get_comments and get.
Without the flag, issue_read keeps its current schema (issue_read.snap
is unchanged) and returns "unknown method" for the three new methods.
With the flag, issue_number leaves the schema's required list because
get_event does not take one. The handler still requires it for the
other methods.
In lockdown mode, get_events and get_timeline drop entries whose author
lacks push access, and get_event returns an error, as issue_read:get
does. commented and reviewed entries name their author in User instead
of Actor, so both are checked. committed entries carry only a name and
email, so lockdown drops them.
Refs github#984, github#985Closesgithub#211
Co-authored-by: Artem Saveliev <artemsaveliev@github.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/feature-flags.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -406,6 +406,28 @@ as output formatting) won't appear here.
406
406
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
407
407
-`repo`: The name of the repository (string, required)
408
408
409
+
### `issue_events`
410
+
411
+
-**issue_read** - Get issue details
412
+
-**OAuth Challenge Scopes**: `repo`
413
+
-`event_id`: The ID of the issue event. Required for, and only used by, the get_event method. (number, optional)
414
+
-`issue_number`: The number of the issue. Required for every method except get_event. (number, optional)
415
+
-`method`: The read operation to perform on a single issue.
416
+
Options are:
417
+
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`.
418
+
2. get_comments - Get issue comments.
419
+
3. get_sub_issues - Get sub-issues (children) of the issue.
420
+
4. get_parent - Get the parent issue, if this issue is a sub-issue of another.
421
+
5. get_labels - Get labels assigned to the issue.
422
+
6. get_events - Get the issue's event history: labeled, assigned, closed, renamed, referenced and so on.
423
+
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.
424
+
8. get_event - Get a single issue event by its `event_id`. Takes `event_id` instead of `issue_number`.
425
+
(string, required)
426
+
-`owner`: The owner of the repository (string, required)
427
+
-`page`: Page number for pagination (min 1) (number, optional)
428
+
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
429
+
-`repo`: The name of the repository (string, required)
"description": "Get information about a specific issue in a GitHub repository.",
8
+
"inputSchema": {
9
+
"properties": {
10
+
"event_id": {
11
+
"description": "The ID of the issue event. Required for, and only used by, the get_event method.",
12
+
"type": "number"
13
+
},
14
+
"issue_number": {
15
+
"description": "The number of the issue. Required for every method except get_event.",
16
+
"type": "number"
17
+
},
18
+
"method": {
19
+
"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",
20
+
"enum": [
21
+
"get",
22
+
"get_comments",
23
+
"get_sub_issues",
24
+
"get_parent",
25
+
"get_labels",
26
+
"get_events",
27
+
"get_timeline",
28
+
"get_event"
29
+
],
30
+
"type": "string"
31
+
},
32
+
"owner": {
33
+
"description": "The owner of the repository",
34
+
"type": "string"
35
+
},
36
+
"page": {
37
+
"description": "Page number for pagination (min 1)",
38
+
"minimum": 1,
39
+
"type": "number"
40
+
},
41
+
"perPage": {
42
+
"description": "Results per page for pagination (min 1, max 100)",
0 commit comments