Skip to content

Commit 05d5e1c

Browse files
Merge branch 'main' into consolidate-project-tools
2 parents 7604acd + 30712de commit 05d5e1c

File tree

5 files changed

+33
-29
lines changed

5 files changed

+33
-29
lines changed

.github/workflows/license-check.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ jobs:
2525
steps:
2626
- name: Check out code
2727
uses: actions/checkout@v6
28-
with:
29-
ref: ${{ github.head_ref }}
28+
29+
# Check out the actual PR branch so we can push changes back if needed
30+
- name: Check out PR branch
31+
env:
32+
GH_TOKEN: ${{ github.token }}
33+
run: gh pr checkout ${{ github.event.pull_request.number }}
3034

3135
- name: Set up Go
3236
uses: actions/setup-go@v6

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ The following sets of tools are available:
758758
- `repo`: Repository name (string, required)
759759

760760
- **assign_copilot_to_issue** - Assign Copilot to issue
761-
- `issueNumber`: Issue number (number, required)
761+
- `issue_number`: Issue number (number, required)
762762
- `owner`: Repository owner (string, required)
763763
- `repo`: Repository name (string, required)
764764

pkg/github/__toolsnaps__/assign_copilot_to_issue.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,8 @@
66
"description": "Assign Copilot to a specific issue in a GitHub repository.\n\nThis tool can help with the following outcomes:\n- a Pull Request created with source code changes to resolve the issue\n\n\nMore information can be found at:\n- https://docs.github.com/en/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot\n",
77
"inputSchema": {
88
"type": "object",
9-
"required": [
10-
"owner",
11-
"repo",
12-
"issueNumber"
13-
],
149
"properties": {
15-
"issueNumber": {
10+
"issue_number": {
1611
"type": "number",
1712
"description": "Issue number"
1813
},
@@ -24,7 +19,12 @@
2419
"type": "string",
2520
"description": "Repository name"
2621
}
27-
}
22+
},
23+
"required": [
24+
"owner",
25+
"repo",
26+
"issue_number"
27+
]
2828
},
2929
"name": "assign_copilot_to_issue",
3030
"icons": [

pkg/github/issues.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,19 +1626,19 @@ func AssignCopilotToIssue(t translations.TranslationHelperFunc) inventory.Server
16261626
Type: "string",
16271627
Description: "Repository name",
16281628
},
1629-
"issueNumber": {
1629+
"issue_number": {
16301630
Type: "number",
16311631
Description: "Issue number",
16321632
},
16331633
},
1634-
Required: []string{"owner", "repo", "issueNumber"},
1634+
Required: []string{"owner", "repo", "issue_number"},
16351635
},
16361636
},
16371637
func(ctx context.Context, deps ToolDependencies, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) {
16381638
var params struct {
1639-
Owner string
1640-
Repo string
1641-
IssueNumber int32
1639+
Owner string `mapstructure:"owner"`
1640+
Repo string `mapstructure:"repo"`
1641+
IssueNumber int32 `mapstructure:"issue_number"`
16421642
}
16431643
if err := mapstructure.Decode(args, &params); err != nil {
16441644
return utils.NewToolResultError(err.Error()), nil, nil

pkg/github/issues_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,8 +2175,8 @@ func TestAssignCopilotToIssue(t *testing.T) {
21752175
assert.NotEmpty(t, tool.Description)
21762176
assert.Contains(t, tool.InputSchema.(*jsonschema.Schema).Properties, "owner")
21772177
assert.Contains(t, tool.InputSchema.(*jsonschema.Schema).Properties, "repo")
2178-
assert.Contains(t, tool.InputSchema.(*jsonschema.Schema).Properties, "issueNumber")
2179-
assert.ElementsMatch(t, tool.InputSchema.(*jsonschema.Schema).Required, []string{"owner", "repo", "issueNumber"})
2178+
assert.Contains(t, tool.InputSchema.(*jsonschema.Schema).Properties, "issue_number")
2179+
assert.ElementsMatch(t, tool.InputSchema.(*jsonschema.Schema).Required, []string{"owner", "repo", "issue_number"})
21802180

21812181
var pageOfFakeBots = func(n int) []struct{} {
21822182
// We don't _really_ need real bots here, just objects that count as entries for the page
@@ -2197,9 +2197,9 @@ func TestAssignCopilotToIssue(t *testing.T) {
21972197
{
21982198
name: "successful assignment when there are no existing assignees",
21992199
requestArgs: map[string]any{
2200-
"owner": "owner",
2201-
"repo": "repo",
2202-
"issueNumber": float64(123),
2200+
"owner": "owner",
2201+
"repo": "repo",
2202+
"issue_number": float64(123),
22032203
},
22042204
mockedClient: githubv4mock.NewMockedHTTPClient(
22052205
githubv4mock.NewQueryMatcher(
@@ -2286,9 +2286,9 @@ func TestAssignCopilotToIssue(t *testing.T) {
22862286
{
22872287
name: "successful assignment when there are existing assignees",
22882288
requestArgs: map[string]any{
2289-
"owner": "owner",
2290-
"repo": "repo",
2291-
"issueNumber": float64(123),
2289+
"owner": "owner",
2290+
"repo": "repo",
2291+
"issue_number": float64(123),
22922292
},
22932293
mockedClient: githubv4mock.NewMockedHTTPClient(
22942294
githubv4mock.NewQueryMatcher(
@@ -2386,9 +2386,9 @@ func TestAssignCopilotToIssue(t *testing.T) {
23862386
{
23872387
name: "copilot bot not on first page of suggested actors",
23882388
requestArgs: map[string]any{
2389-
"owner": "owner",
2390-
"repo": "repo",
2391-
"issueNumber": float64(123),
2389+
"owner": "owner",
2390+
"repo": "repo",
2391+
"issue_number": float64(123),
23922392
},
23932393
mockedClient: githubv4mock.NewMockedHTTPClient(
23942394
// First page of suggested actors
@@ -2512,9 +2512,9 @@ func TestAssignCopilotToIssue(t *testing.T) {
25122512
{
25132513
name: "copilot not a suggested actor",
25142514
requestArgs: map[string]any{
2515-
"owner": "owner",
2516-
"repo": "repo",
2517-
"issueNumber": float64(123),
2515+
"owner": "owner",
2516+
"repo": "repo",
2517+
"issue_number": float64(123),
25182518
},
25192519
mockedClient: githubv4mock.NewMockedHTTPClient(
25202520
githubv4mock.NewQueryMatcher(

0 commit comments

Comments
 (0)