Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/issue-monster.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions pkg/workflow/data/github_tool_to_toolset.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"list_commits": "repos",
"get_commit": "repos",
"get_latest_release": "repos",
"list_starred_repositories": "repos",
"list_releases": "repos",
"get_release_by_tag": "repos",
"get_tag": "repos",
Expand All @@ -26,12 +27,19 @@
"pull_request_read": "pull_requests",
"list_pull_requests": "pull_requests",
"get_pull_request": "pull_requests",
"get_pull_request_comments": "pull_requests",
"get_pull_request_diff": "pull_requests",
"get_pull_request_files": "pull_requests",
"get_pull_request_review_comments": "pull_requests",
"get_pull_request_reviews": "pull_requests",
"get_pull_request_status": "pull_requests",
"create_pull_request": "pull_requests",
"search_pull_requests": "pull_requests",

"list_workflows": "actions",
"list_workflow_runs": "actions",
"get_workflow_run": "actions",
"get_workflow_run_logs": "actions",
"download_workflow_run_artifact": "actions",
"get_workflow_run_usage": "actions",
"list_workflow_jobs": "actions",
Expand All @@ -42,21 +50,32 @@
"get_code_scanning_alert": "code_security",
"create_code_scanning_alert": "code_security",

"list_dependabot_alerts": "dependabot",
"get_dependabot_alert": "dependabot",

"list_discussions": "discussions",
"list_discussion_categories": "discussions",
"get_discussion": "discussions",
"get_discussion_comments": "discussions",
"create_discussion": "discussions",

"create_gist": "gists",
"list_gists": "gists",

"get_label": "labels",
"list_label": "issues",
"list_labels": "labels",
"create_label": "labels",

"list_issue_types": "issues",

"list_notifications": "notifications",
"get_notification_details": "notifications",
"mark_notifications_read": "notifications",

"get_organization": "orgs",
"list_organizations": "orgs",
"search_orgs": "orgs",

"list_secret_scanning_alerts": "secret_protection",
"get_secret_scanning_alert": "secret_protection",
Expand Down
10 changes: 10 additions & 0 deletions pkg/workflow/github_tool_to_toolset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ package workflow
import (
"strings"
"testing"

"github.com/github/gh-aw/pkg/constants"
)

func TestValidateGitHubToolsAgainstToolsets(t *testing.T) {
Expand Down Expand Up @@ -240,6 +242,14 @@ func TestGitHubToolToToolsetMap_Completeness(t *testing.T) {
}
}

func TestGitHubToolToToolsetMap_IncludesDefaultGitHubTools(t *testing.T) {
for _, tool := range constants.DefaultReadOnlyGitHubTools {
if _, exists := GitHubToolToToolsetMap[tool]; !exists {
t.Errorf("Expected tool %q from constants.DefaultReadOnlyGitHubTools to be in GitHubToolToToolsetMap", tool)
}
}
}

func TestGitHubToolToToolsetMap_ConsistencyWithDocumentation(t *testing.T) {
// Sample of tools that should be in the map based on documentation
expectedMappings := map[string]string{
Expand Down