# Github dbt docs Sync

Connect your Github dbt repository directly in Select Star with the following steps

1. Using the Github Configuration UI available in the Apps section, add the Github repo details.

   <figure><img src="https://3470314135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgAiVthA_yg9UXKuhyY%2Fuploads%2Fgit-blob-7ce9532a36ced2d61f2b454711dcf1e61000dd4a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
2. To ensure Select Star can access your Github Repo, install the Github app on your repository.\
   \
   Github App: [Select Star dbt docs Sync](https://github.com/apps/select-star-dbt-docs-sync)\\

   **Github App Required Permissions**

   * **Read access to metadata:** This allows us to ensure we are syncing the descriptions to the updated models.
   * **Read and write access to code and pull request:** This allows us to create or delete a PR and verify that there are no conflicts when generating a PR.

<div data-full-width="true"><figure><img src="https://3470314135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgAiVthA_yg9UXKuhyY%2Fuploads%2Fgit-blob-ea272c3b7e0cf829f10581fcf22b6d84c27dcb69%2Fimage.png?alt=media" alt=""><figcaption><p>Install the Github App on your Github Repo</p></figcaption></figure></div>

<figure><img src="https://3470314135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgAiVthA_yg9UXKuhyY%2Fuploads%2Fgit-blob-fa8ab8cbec5042607469c8ececb0d431c7c42362%2Fimage.png?alt=media" alt=""><figcaption><p>Github App: Select Star dbt docs Sync</p></figcaption></figure>

<figure><img src="https://3470314135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgAiVthA_yg9UXKuhyY%2Fuploads%2Fgit-blob-b4bbfd82155a39660f9678ad9b109e92cddb971c%2Fimage.png?alt=media" alt=""><figcaption><p>Select the list of repositories</p></figcaption></figure>

3. Provide the following information

* Select Star Datasource - This dropdown will have a list of all your connected dbt Datasources
* Github URL - Provide the Github Repository URL
* Project Name - dbt Project name, as mentioned in the `dbt_project.yml` file, and
* Path Prefix - Information about the Root folder (if the dbt project is not in the root folder)

<figure><img src="https://3470314135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgAiVthA_yg9UXKuhyY%2Fuploads%2Fgit-blob-29872070d93620193a5719d8f7756f0f87884d35%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Once this is setup, you will see new PRs generated in your Github Repo.

<figure><img src="https://3470314135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgAiVthA_yg9UXKuhyY%2Fuploads%2Fgit-blob-93cf496b39c63a877078f31e5af9de20ac95e655%2Fimage.png?alt=media" alt=""><figcaption><p>Github PR</p></figcaption></figure>

You will also be able to see the list of all the PRs created by this feature in the Select Star UI.

<figure><img src="https://3470314135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgAiVthA_yg9UXKuhyY%2Fuploads%2Fgit-blob-cb4ceec442e94631ad9eff385c69e2f5e006c28c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
