Skip to content

Commit 52afc7f

Browse files
authored
Merge pull request #492 from Extra-Chill/fix/nonrepeatable-issue-list
Fix repeated GitHub issue list calls
2 parents 1cb75f7 + 8e65a12 commit 52afc7f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

inc/Tools/GitHubTools.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ public function handleListIssues( array $parameters, array $tool_def = array() )
260260
*/
261261
public function getListIssuesDefinition(): array
262262
{
263-
return $this->repeatableDefinition(
264-
array(
263+
return array(
265264
'class' => __CLASS__,
266265
'method' => 'handleListIssues',
267266
'description' => 'List issues from a GitHub repository. Returns issue numbers, titles, states, labels, assignees, comment counts, timestamps, and a generated_at timestamp. Use to review open issues, track progress, or find specific issues by label.',
@@ -287,7 +286,6 @@ public function getListIssuesDefinition(): array
287286
),
288287
'required' => array( 'repo' ),
289288
),
290-
)
291289
);
292290
}
293291

tests/smoke-github-create-tools.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ function is_wp_error( $thing ): bool
218218
$assert('remove_label_from_issue is available in chat', in_array('chat', $github_tools->registered['remove_label_from_issue']['contexts'] ?? array(), true));
219219
$assert('remove_label_from_issue is available in pipeline', in_array('pipeline', $github_tools->registered['remove_label_from_issue']['contexts'] ?? array(), true));
220220

221+
$list_issues_definition = $github_tools->getListIssuesDefinition();
222+
$assert('list_github_issues uses default duplicate guard', 'repeatable' !== ( $list_issues_definition['runtime']['duplicate_policy'] ?? '' ));
223+
221224
$issue_definition = $issue_tool->getToolDefinition();
222225
$issue_params = $issue_definition['parameters']['properties'] ?? array();
223226
$assert('create_github_issue exposes assignees from ability schema', array_key_exists('assignees', $issue_params));

0 commit comments

Comments
 (0)