> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shanone.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

> エージェントからIssue、プルリクエスト、Actionsワークフロー、セキュリティアラート、組織管理を操作する

# GitHub

ShanoneのGitHub連携では、日常的なIssue・PRのワークフローからCI/CD、コード/シークレットスキャン、組織管理、gistまで、176のツールをエージェントが利用できるようになります。

## はじめに

<Steps>
  <Step title="OAuthで接続する">
    エージェントにGitHubで何か作業をしてもらう(例:「my-org/my-repoのオープンなPRを一覧表示して」)か、Shanoneダッシュボードの**Integrations**から事前に接続します。
  </Step>

  <Step title="リクエストされたスコープを承認する">
    GitHubのOAuth承認画面には、Shanoneがリクエストするスコープ(リポジトリへのアクセス、組織の読み取りなど)が表示されます——内容を確認して承認してください。
  </Step>

  <Step title="リクエストを再試行する">
    接続が完了すると、`github_*`ツールに対するエージェントの`shanone_execute_tool`呼び出しが成功するようになります。
  </Step>
</Steps>

## 利用可能なツール

ShanoneはGitHub用に**176のツール**を提供しており、以下のカテゴリに分類されています。

<AccordionGroup>
  <Accordion title="Issue & ラベル">
    `github_create_issue`, `github_get_issue`, `github_update_issue`, `github_list_issues`, `github_create_issue_comment`, `github_list_pr_comments` (issue comments), `github_create_label`, `github_update_label`, `github_delete_label`, `github_list_labels`, `github_get_label`, `github_create_milestone`, `github_update_milestone`, `github_delete_milestone`, `github_list_milestones`, `github_get_milestone`
  </Accordion>

  <Accordion title="プルリクエスト & レビュー">
    `github_create_pull_request`, `github_get_pull_request`, `github_update_pull_request`, `github_list_pull_requests`, `github_merge_pull_request`, `github_list_pr_files`, `github_create_pr_comment`, `github_list_pr_comments`, `github_create_pr_review`, `github_submit_pr_review`, `github_get_pr_review`, `github_list_pr_reviews`, `github_request_reviewers`, `github_list_requested_reviewers`
  </Accordion>

  <Accordion title="リポジトリコンテンツ & ブランチ">
    `github_get_content`, `github_create_or_update_file`, `github_delete_file`, `github_get_readme`, `github_list_branches`, `github_get_branch`, `github_create_branch`, `github_rename_branch`, `github_delete_branch`, `github_compare_commits`, `github_list_commits`, `github_get_commit`, `github_create_commit_comment`, `github_list_commit_comments`
  </Accordion>

  <Accordion title="リポジトリ & 組織">
    `github_create_repo`, `github_get_repo`, `github_list_repos`, `github_list_org_repos`, `github_get_org`, `github_list_org_members`, `github_star_repo`, `github_unstar_repo`, `github_list_stargazers`, `github_list_contributors`, `github_list_languages`, `github_list_tags`, `github_get_authenticated_user`, `github_list_user_orgs`
  </Accordion>

  <Accordion title="Actions(ワークフロー、実行、アーティファクト)">
    `github_list_workflows`, `github_trigger_workflow`, `github_list_workflow_runs`, `github_get_workflow_run`, `github_cancel_workflow_run`, `github_rerun_workflow`, `github_rerun_workflow_failed_jobs`, `github_list_workflow_jobs`, `github_get_workflow_job`, `github_get_workflow_job_logs`, `github_list_workflow_artifacts`, `github_get_artifact`, `github_delete_artifact`, `github_get_archive_link`
  </Accordion>

  <Accordion title="チェック & デプロイメント">
    `github_create_check_run`, `github_update_check_run`, `github_get_check_run`, `github_list_check_runs_for_ref`, `github_rerequest_check_run`, `github_create_check_suite`, `github_get_check_suite`, `github_list_check_suites_for_ref`, `github_rerequest_check_suite`, `github_create_deployment`, `github_get_deployment`, `github_list_deployments`, `github_create_deployment_status`, `github_get_deployment_status`, `github_list_deployment_statuses`, `github_delete_deployment`, `github_list_deployment_branch_policies`
  </Accordion>

  <Accordion title="セキュリティスキャン & シークレット">
    `github_list_code_scanning_alerts`, `github_get_code_scanning_alert`, `github_update_code_scanning_alert`, `github_list_code_scanning_alert_instances`, `github_list_code_scanning_analyses`, `github_get_code_scanning_analysis`, `github_list_dependabot_alerts`, `github_get_dependabot_alert`, `github_update_dependabot_alert`, `github_list_org_dependabot_alerts`, `github_list_secret_scanning_alerts`, `github_get_secret_scanning_alert`, `github_update_secret_scanning_alert`, `github_list_secret_scanning_alert_locations`, `github_list_repo_security_advisories`, `github_get_repo_security_advisory`, `github_create_or_update_repo_secret`, `github_delete_repo_secret`, `github_list_repo_secrets`, `github_get_repo_secret`, `github_get_repo_public_key`, `github_create_or_update_org_secret`, `github_delete_org_secret`, `github_list_org_secrets`, `github_get_org_secret`, `github_get_org_public_key`
  </Accordion>

  <Accordion title="変数、Webhook & チーム">
    `github_create_repo_variable`, `github_update_repo_variable`, `github_delete_repo_variable`, `github_list_repo_variables`, `github_get_repo_variable`, `github_create_org_variable`, `github_update_org_variable`, `github_delete_org_variable`, `github_list_org_variables`, `github_get_org_variable`, `github_create_repo_webhook`, `github_update_repo_webhook`, `github_delete_repo_webhook`, `github_list_repo_webhooks`, `github_get_repo_webhook`, `github_ping_repo_webhook`, `github_test_repo_webhook`, `github_list_webhook_deliveries`, `github_get_team`, `github_list_teams`, `github_list_team_members`, `github_list_team_repos`
  </Accordion>

  <Accordion title="ディスカッション、gist & 通知">
    `github_create_discussion`, `github_update_discussion`, `github_delete_discussion`, `github_get_discussion`, `github_list_discussions`, `github_list_discussion_categories`, `github_create_discussion_comment`, `github_list_discussion_comments`, `github_create_gist`, `github_update_gist`, `github_delete_gist`, `github_get_gist`, `github_list_gists`, `github_star_gist`, `github_unstar_gist`, `github_fork_gist`, `github_list_public_gists`, `github_list_notifications`, `github_mark_notifications_read`, `github_mark_thread_read`
  </Accordion>

  <Accordion title="検索 & リリース">
    `github_search_code`, `github_search_issues`, `github_search_repos`, `github_create_release`, `github_update_release`, `github_delete_release`, `github_get_release`, `github_get_latest_release`, `github_list_releases`, `github_list_release_assets`, `github_delete_release_asset`
  </Accordion>
</AccordionGroup>

## よくある使い方

<CardGroup cols={2}>
  <Card title="Issueトリアージ" icon="list-check">
    自然言語のリクエストからIssueを検索し、ラベル付けし、コメントする
  </Card>

  <Card title="PRレビューの自動化" icon="git-pull-request">
    オープンなPRを一覧表示し、差分を取得し、レビューを提出する
  </Card>

  <Card title="CI/CD制御" icon="play">
    ワークフローをトリガーし、実行ログを確認し、失敗したジョブを再実行する
  </Card>

  <Card title="セキュリティ監視" icon="shield-alert">
    オープンなDependabot、コードスキャン、シークレットスキャンのアラートを可視化する
  </Card>
</CardGroup>

## トラブルシューティング

<AccordionGroup>
  <Accordion title="組織レベルのツールで403や404が返る">
    組織スコープのツール(`github_list_org_secrets`、`github_get_org`など)を使うには、接続済みアカウントが適切な組織ロールを持っている必要があります。これらが失敗する場合は、管理者権限を持つアカウントで再接続してください。
  </Accordion>

  <Accordion title="ワークフローのトリガーは成功するが何も実行されない">
    ワークフローファイルが実際に`workflow_dispatch`トリガーを宣言しているか確認してください——`github_trigger_workflow`はこのトリガーをサポートするワークフローのみ開始できます。
  </Accordion>

  <Accordion title="シークレット/変数ツールが空の値を返す">
    GitHubは仕様上、APIを通じてシークレットの値を返しません——`github_get_repo_secret`などはメタデータ(名前、タイムスタンプ)のみを返し、平文の値は返しません。
  </Accordion>
</AccordionGroup>
