Integrate GitHub

HC: Notion x GitHub
In this Article

Connect Notion and GitHub so you can keep your workflows in sync 🧮

GitHub helps development teams and companies build, ship, and maintain their software. Use the power of Notion databases — with filters, views, relations, and more — to connect GitHub across your Notion workflows.

You will need to be both a Notion workspace owner and a GitHub org admin to connect Notion and the GitHub workspace app.

  • Go to Settings & members on the top of the sidebar.

  • Click on My connections and find GitHub (Workspace).

  • Click Connect and go through the authentication flow.

Link to a file or specific lines from a file directly in Notion. You can even link from a specific commit or branch if you want the code you’re referencing to be up-to-date.

To do this, simply copy the permalink for your desired lines from GitHub and paste it into a Notion page. In the menu that appears, select Paste as preview to embed the code into your page.

The GitHub Pull Request property inside your Notion database will automatically keep your cross-functional teams informed of task statuses. It also has many attributes that you can use in rollups, formulas, and filters.

  • In a Notion database, click + to add a new property.

  • Search for and click GitHub Pull Requests to add this property to your database.

  • Make sure your database has a Unique ID property. This property will be added to your database if it doesn’t already have one.

  • To use the GitHub Pull Request property, make sure you’ve connected your GitHub account with Notion. Then, either add the Unique ID of the Notion task to the pull request, or paste the GitHub pull request URL into the property.

By default, Notion enables backlinks on Notion tasks to GitHub. If you want to turn this off, click on the GitHub Pull Request property in your database → Edit property. Toggle off Linkbacks in GitHub.

Automate task status updates

You can use the GitHub Pull Requests property to automatically update the status of your tasks in Notion.

  • Select the title of your GitHub Pull Requests property and click Edit property.

  • Find the Auto-update section and select the status property you want to update from the drop down menu.

  • Select the task status to be set when the GitHub PR is Opened, Review Requested, Approved, and Merged.

  • Now when the PR progresses in GitHub, your task status in Notion will be updated automatically based on your settings.

You can also show GitHub activity in the linked Notion task. To do this, click on the GitHub property in your database → Edit property. Turn on Activity Comments.

If you want to link a GitHub PR to one or more Notion tasks, simply enter a magic word and the Notion tasks’ unique ID in your PR’s description.

Magic words are key words that help establish relationships between Notion tasks and GitHub PRs. You can use any of the following words:

  • close, closes, closed

  • fix, fixes, fixed

  • resolve, resolves, resolved

  • complete, completes, completed, completing

  • ref, references

  • part of

  • related to

  • contributes to

  • towards

For example, your PR could have the description “fixes CTT-13”. Once that description is set, your Notion task with the ID CTT-13 will be linked with that PR.

If your PR description uses magic words associated with closing or finishing a task, the Notion task will be marked as done when the PR is merged.

If your PR description uses magic words associated with referring to or relating to a task, the Notion task will not be marked as done when the PR is merged.

You can link Notion tasks as reference-only, so that those tasks won’t be marked as done.

Give Feedback

Was this resource helpful?

Powered by Fruition