# GitHub

## Overview

Creating issues in GitHub will automatically create tasks in Dework and tasks can be linked to pull requests to automatically update their status.

This is an overview of this integration's basics. For a more practical guide, see  🖥 [Bountied Issues with Github + Dework](/product-docs/workflows/operations/bountied-issues-with-github-+-dework.md)

## Basics

### Setup

You will be able to configure the  `GitHub integration`  by going to a project’s  `Settings`, under the  `Integrations`  tab.

{% hint style="info" %}
One project can be connected to many repositories at the same time.
{% endhint %}

![Finding the Github integration](/files/EYqa5A7Kki2kMJDPFju1)

### Integration Options

It’s a two-way sync: you can both create Tasks from your GitHub Issues and create Issues from your Dework Tasks.

![Connecting a repo](/files/LN5526LrrMkMbJY1AWfB)

#### Import existing Github issues to Dework

If selected when connecting the repo, it will import all existing issues from that repo to Dework. New Dework tasks will be created and things like issue `Name`, `Description` and `Labels` will carry over.&#x20;

#### Create Dework Tasks from GitHub Issues

This is enabled by default. New issues created in your GitHub repository will automatically create tasks in the `To Do` column of your Dework project. Some metadata like issue `Name`, `Description` and `Labels` will carry over.

#### Create GitHub Issues when Dework task is created&#x20;

You can decide to enable it right after selecting a repository to connect in your project  `Settings`. When creating a task in your project on Dework, it will automatically create an issue in your GitHub repository.

{% hint style="success" %}
For bigger GitHub repos, you might not always want to sync all issues to Dework. When adding a repo, you can select which labels should be synced

**Note**: If your repos are already connected, you will need to disconnect & reconnect to enable this
{% endhint %}

![Select specifically labelled issues to sync from GitHub to Dework](/files/GiGlroBuHnNrqtruplkj)

### Link tasks with Pull Requests

After connecting a repository to a project, we will automatically generate branch names for your tasks that you can then use to link a specific task to a new branch.

Ex: `git checkout -b jala/dw-2208/show-onboarding-flow-for`

This branch name can be found when clicking the  `Link GitHub Branch`  button on your tasks.

![Linking a branch to a task](/files/StWaWcijze8GnF0387ld)

{% hint style="success" %}
**Automation**: After linking a task to a branch, if a Pull Request is opened, the task’s status will automatically change to In Review. Then, if the PR is merged, the task will move to Done.
{% endhint %}

## Use Cases

🖥 [Bounties Issues with Github + Dework](/product-docs/workflows/operations/bountied-issues-with-github-+-dework.md)


---

# 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://dework.gitbook.io/product-docs/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.
