Skip to content

Commit 0196e0c

Browse files
Update consolidated projects tools: make owner_type optional and fix add_project_item
Co-authored-by: SamMorrowDrums <[email protected]> Fix tests and update toolsnaps for consolidated projects tools Co-authored-by: SamMorrowDrums <[email protected]>
1 parent d88eb83 commit 0196e0c

File tree

7 files changed

+385
-96
lines changed

7 files changed

+385
-96
lines changed

pkg/github/__toolsnaps__/assign_copilot_to_issue.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"type": "string"
2424
},
2525
"custom_instructions": {
26-
"type": "string",
27-
"description": "Optional custom instructions to guide the agent beyond the issue body. Use this to provide additional context, constraints, or guidance that is not captured in the issue description"
26+
"description": "Optional custom instructions to guide the agent beyond the issue body. Use this to provide additional context, constraints, or guidance that is not captured in the issue description",
27+
"type": "string"
2828
},
2929
"issue_number": {
3030
"description": "Issue number",

pkg/github/__toolsnaps__/projects_get.snap

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
"type": "string"
3232
},
3333
"owner": {
34-
"description": "If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive.",
34+
"description": "The owner (user or organization login). The name is not case sensitive.",
3535
"type": "string"
3636
},
3737
"owner_type": {
38-
"description": "Owner type",
38+
"description": "Owner type (user or org). If not provided, will be automatically detected.",
3939
"enum": [
4040
"user",
4141
"org"
@@ -49,7 +49,6 @@
4949
},
5050
"required": [
5151
"method",
52-
"owner_type",
5352
"owner",
5453
"project_number"
5554
],

pkg/github/__toolsnaps__/projects_list.snap

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
"type": "string"
3232
},
3333
"owner": {
34-
"description": "If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive.",
34+
"description": "The owner (user or organization login). The name is not case sensitive.",
3535
"type": "string"
3636
},
3737
"owner_type": {
38-
"description": "Owner type",
38+
"description": "Owner type (user or org). If not provided, will automatically try both.",
3939
"enum": [
4040
"user",
4141
"org"
@@ -57,7 +57,6 @@
5757
},
5858
"required": [
5959
"method",
60-
"owner_type",
6160
"owner"
6261
],
6362
"type": "object"

pkg/github/__toolsnaps__/projects_write.snap

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,22 @@
66
"description": "Add, update, or delete project items in a GitHub Project.",
77
"inputSchema": {
88
"properties": {
9+
"issue_number": {
10+
"description": "The issue number (use when item_type is 'issue' for 'add_project_item' method). Provide either issue_number or pull_request_number.",
11+
"type": "number"
12+
},
913
"item_id": {
10-
"description": "The project item ID. Required for 'update_project_item' and 'delete_project_item' methods. For add_project_item, this is the numeric ID of the issue or pull request to add.",
14+
"description": "The project item ID. Required for 'update_project_item' and 'delete_project_item' methods.",
1115
"type": "number"
1216
},
17+
"item_owner": {
18+
"description": "The owner (user or organization) of the repository containing the issue or pull request. Required for 'add_project_item' method.",
19+
"type": "string"
20+
},
21+
"item_repo": {
22+
"description": "The name of the repository containing the issue or pull request. Required for 'add_project_item' method.",
23+
"type": "string"
24+
},
1325
"item_type": {
1426
"description": "The item's type, either issue or pull_request. Required for 'add_project_item' method.",
1527
"enum": [
@@ -28,11 +40,11 @@
2840
"type": "string"
2941
},
3042
"owner": {
31-
"description": "If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive.",
43+
"description": "The project owner (user or organization login). The name is not case sensitive.",
3244
"type": "string"
3345
},
3446
"owner_type": {
35-
"description": "Owner type",
47+
"description": "Owner type (user or org). If not provided, will be automatically detected.",
3648
"enum": [
3749
"user",
3850
"org"
@@ -43,14 +55,17 @@
4355
"description": "The project's number.",
4456
"type": "number"
4557
},
58+
"pull_request_number": {
59+
"description": "The pull request number (use when item_type is 'pull_request' for 'add_project_item' method). Provide either issue_number or pull_request_number.",
60+
"type": "number"
61+
},
4662
"updated_field": {
4763
"description": "Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set value to null. Example: {\"id\": 123456, \"value\": \"New Value\"}. Required for 'update_project_item' method.",
4864
"type": "object"
4965
}
5066
},
5167
"required": [
5268
"method",
53-
"owner_type",
5469
"owner",
5570
"project_number"
5671
],

pkg/github/minimal_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ type MinimalProject struct {
131131
Number *int `json:"number,omitempty"`
132132
ShortDescription *string `json:"short_description,omitempty"`
133133
DeletedBy *MinimalUser `json:"deleted_by,omitempty"`
134+
OwnerType string `json:"owner_type,omitempty"`
134135
}
135136

136137
// Helper functions

0 commit comments

Comments
 (0)