# GitHub

## What this integration can do

GitHub commonly serves as:

* A source of issue and repository activity
* A workflow input for triage, routing, and review
* A place where Proteges detect new work and decide how to respond

## Prerequisites

* Access to the GitHub organization, repository, or account you want to connect
* Permission to approve the connection
* A clear repo or project boundary for the automation

## Connect

1. Open **Integrations**.
2. Select **GitHub**.
3. Complete the connection flow.
4. Confirm the connection is active.

## Trigger Access

Use Trigger Access when GitHub events should start the Protege.

Examples:

* New issue activity
* Selected repository events

## Tool Access

Use Tool Access when the Protege should read GitHub context or take an action tied to GitHub data or results derived from it.

Examples:

* Read issue context
* Read pull request context
* Support triage or routing workflows
* Feed a downstream action in another system

## Permissions and scopes

Review the GitHub consent screen and allow only what your workflow needs. In practice, Hookshot needs permission to:

* Read the GitHub objects that should activate the workflow
* Access enough repository context for the Protege to make the intended decision

If the Protege should only operate on one repo or one team workflow, keep the connection boundary as narrow as possible.

## How to verify

* Confirm GitHub is connected
* Confirm the intended trigger source is live
* Trigger a safe test event in the intended repo boundary
* Confirm the event appears in Event Feed
* Confirm the corresponding run appears in Audit

## Common mistakes

* Connecting the wrong repo or account
* Treating a repo-level workflow like an org-wide workflow
* Forgetting to validate the exact event type that should activate the Protege

## Troubleshooting

* If Event Feed never shows the GitHub event, check Trigger Access and connection scope.
* If Event Feed shows the event but the Protege is `skipped`, tighten the Protege description and review readiness.
* If Audit shows the run but the action is incomplete, check the downstream integration and tool path.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tryprotege.com/integrations/github.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
