> For the complete documentation index, see [llms.txt](https://village-labs.gitbook.io/coworker-product-and-developer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://village-labs.gitbook.io/coworker-product-and-developer-docs/data-connections/github.md).

# Github

### Prerequisites

* A Github account with access to the repositories you wish to sync with Coworker.

### Generating the credentials

1. Go to your Github developer settings to create a new Personal Access Token\
   <https://github.com/settings/tokens>
2. Create a new classic token<br>

   <figure><img src="/files/DBjl8QyMR2Rl4ghj2KcF" alt=""><figcaption><p>Click "Generate new token (classic)"</p></figcaption></figure>
3. Set the token Note to Village Access Token, and set the Expiration to No Expiration (note that this token can always be manually revoked in Github in future, but setting a custom expiration date will require this entire process to be re-run once the expiration date is hit).
4. Check the following boxes.

   <figure><img src="/files/aosxvN5OlWh6QR831nYd" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/4fxlqQFhB6J1zuMrinyJ" alt=""><figcaption></figcaption></figure>
5. Copy your token and store it in a secure place (like 1Password, LastPass or Bitwarden).<br>

   <figure><img src="/files/gFFDdDDoW7UIRJyy8AM8" alt=""><figcaption></figcaption></figure>

### Information required for the Coworker connection:

Please share the following information with the Coworker team via a secure connection (eg. 1Password, LastPass or Bitwarden).

* `access_token`: The access token created above
* `repository`: A comma-separated list of repositories that Coworker should monitor, prefixed with the username/organization (there should be no spaces) eg. `seriouscorp/FizzBuzzEnterpriseEdition,seriouscorp/AbsoluteAGI`&#x20;
* `start_date`: Date of the first record to synchronize, in a ISO8601 format (eg. `2024-01-01`) . Commits before this date will not be synchronized.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://village-labs.gitbook.io/coworker-product-and-developer-docs/data-connections/github.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
