Class GitHubTools
Native GitHub tools for issue, PR, and repository workflows. Uses the gh CLI for authentication and API access.
[ToolPlugin("github")]
public sealed class GitHubTools
- Inheritance
-
GitHubTools
- Inherited Members
Methods
CloseIssueAsync(int, string?, string?)
[KernelFunction("github_close_issue")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static Task<string> CloseIssueAsync(int number, string? repo = null, string? comment = null)
Parameters
Returns
CreateIssueAsync(string, string, string?, string?, string?)
[KernelFunction("github_create_issue")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static Task<string> CreateIssueAsync(string title, string body, string? repo = null, string? labels = null, string? assignees = null)
Parameters
Returns
CreatePullRequestAsync(string, string, string, string?, string?, bool)
[KernelFunction("github_create_pr")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static Task<string> CreatePullRequestAsync(string title, string body, string baseBranch = "main", string? repo = null, string? labels = null, bool draft = false)
Parameters
Returns
GetAuthStatusAsync()
[KernelFunction("github_auth_status")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> GetAuthStatusAsync()
Returns
GetIssueAsync(int, string?, bool)
[KernelFunction("github_get_issue")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> GetIssueAsync(int number, string? repo = null, bool includeComments = false)
Parameters
Returns
GetPrChecksAsync(int, string?)
[KernelFunction("github_pr_checks")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> GetPrChecksAsync(int number, string? repo = null)
Parameters
Returns
GetPullRequestAsync(int, string?, bool)
[KernelFunction("github_get_pr")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> GetPullRequestAsync(int number, string? repo = null, bool includeDiff = false)
Parameters
Returns
GetRepoInfoAsync(string?)
[KernelFunction("github_repo_info")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> GetRepoInfoAsync(string? repo = null)
Parameters
repostring
Returns
GetRunDetailsAsync(long, string?, bool)
[KernelFunction("github_run_details")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> GetRunDetailsAsync(long runId, string? repo = null, bool showLogs = true)
Parameters
Returns
ListIssuesAsync(string?, string, string?, int)
[KernelFunction("github_list_issues")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> ListIssuesAsync(string? repo = null, string state = "open", string? labels = null, int limit = 30)
Parameters
Returns
ListPullRequestsAsync(string?, string, int)
[KernelFunction("github_list_prs")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> ListPullRequestsAsync(string? repo = null, string state = "open", int limit = 30)
Parameters
Returns
ListReleasesAsync(string?, int)
[KernelFunction("github_list_releases")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> ListReleasesAsync(string? repo = null, int limit = 10)
Parameters
Returns
ListWorkflowRunsAsync(string?, string?, string?, int)
[KernelFunction("github_list_runs")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> ListWorkflowRunsAsync(string? repo = null, string? branch = null, string? workflow = null, int limit = 10)
Parameters
Returns
MergePullRequestAsync(int, string?, string, bool)
[KernelFunction("github_merge_pr")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static Task<string> MergePullRequestAsync(int number, string? repo = null, string method = "squash", bool deleteBranch = true)
Parameters
Returns
ReviewPullRequestAsync(int, string, string, string?)
[KernelFunction("github_pr_review")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static Task<string> ReviewPullRequestAsync(int number, string action, string body, string? repo = null)
Parameters
Returns
SearchIssuesAsync(string, string?, int)
[KernelFunction("github_search_issues")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static Task<string> SearchIssuesAsync(string query, string? repo = null, int limit = 20)