# Discourse Code Review

**URL:** https://meta.discourse.org/t/discourse-code-review/103142
**Category:** Plugin
**Tags:** official, code-review
**Created:** [November 30, 2018, 4:40am UTC](https://meta.discourse.org/t/discourse-code-review/103142 "2018-11-30T04:40:26Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [November 30, 2018, 4:40am UTC](https://meta.discourse.org/t/discourse-code-review/103142/1 "2018-11-30T04:40:26Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Discourse Code Review** allows the ability to review GitHub commits on Discourse. |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-code-review](https://github.com/discourse/discourse-code-review) |
| 📖 | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |

> [@](#):
>
> :discourse2: As this is an #official plugin maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate plugin tag. Click on a link below to get one started. 👍
> 
> [❓&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&body=%3E%20Before%20asking,%20did%20you%20search%20first%3F%20Press%20%F0%9F%94%8D%20at%20the%20upper%20right%20to%20search.&tags=code-review "Ask for support on configuring and using Discourse Code Review") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=code-review "A bug report means something is broken, preventing normal/typical use of the plugin") [👀&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=code-review "Discussion about the user interface of Discourse Code Review, and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=code-review "Discussion about how existing Discourse Code Review features can be improved or enhanced, and how proposed new features could work")

### Features

#### What it is?

The Discourse Code Review plugin provides 2 way integration with GitHub code repositories. It allows your team to review commits to a repository leveraging Discourse features and plugins such as assign, whispers, notification, custom workflows and so on. Each commit to a repository becomes a topic. Replies to the topic are mirrored on GitHub. Integration is bi-directional meaning you can comment on Discourse and see it in GitHub or comment in GitHub and see it in Discourse.

It provides a very powerful workflow for teams who need to to review all commits to any number of repositories.

It allows you to ensure that multiple team members are aware of all changes applied to repositories. You can mark commits for follow-up, assign out review work and more.

Note: When viewing a topic that can be approved, you can use the y button on your keyboard to approve commits faster.

#### Can I see it in Action?

Discourse uses this plugin internally for keeping track of repositories. You can see an example of the Discourse side here:

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/e/6ee3f0fc972cb6e9a8a850de79dafbd4c16e3f1e.png)

On GitHub the same topic looks like this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/f/8f0e0d0351015a7fe77664ca168932b70c616a91.png)

### Configuration

The plugin relies on GitHub webhooks to discover repositories and changes on repositories. For a minimal configuration you will need to set the following setting to a secret string.

`code review github webhook secret`

Once set on your GitHub repository setup a webhook with:

**Payload URL** : `https://YOUR_DISCOURSE/code-review/webhook`  
**Content Type** : `application/json`  
**Secret** : the value of `code review github webhook secret`  
**Event Types** :

- Commit comments
- Issue comments
- Pull requests
- Pull request reviews
- Pull request review comments
- Pushes

The plugin provides the following additional site settings:

`code review api username` : GitHub is very restrictive with the number of anonymous API requests it allows, this setting allows you to use a Discourse user’s account keys for `/comments` and `/commit` requests. This heavily reduces chances of hitting rate limits.

`code review catch up commits` : number of commits to “catch up” and create topics for when you encounter a new repo.

`code review default parent category`: choose a default parent category for categories created by the plugin

`code review pending tag`: Tag to apply to all unreviewed commits, `pending` by default

`code review approved tag`: Tag to apply to approved commits, `approved` by default

`code_review_followup_tag`: Tag to apply to follow-up commits `follow-up` by default

`code review allow self approval`: Are staff allowed to approve own commits?

`code review default mute new categories`: New categories created by code review are muted for users by default

`code review skip duration minutes`: Clicking the skip button on a commit will prevent that commit from showing up again for the number of minutes set by this setting.

### CHANGELOG

### TODO

### Extras

#### How Discourse Uses This Plugin

TL;DR - This plugin was designed to complement the Discourse team’s use of GitHub for code review.

> **More Information**
>
> > From @sam:
> > 
> > - We still use PRs using GitHub UI and love doing PRs for lots of changes. Nothing has changed here. GitHub is fantastic, we love GitHub. They have an excellent workflow for changes that _have not yet landed_. However…
> > 
> > - GitHubs workflow for changes _that have been committed directly_ to the repository is terrible.
> > 
> > - Review fills a gap that simply can not be filled with GitHub today, we would like at least one team member to review every change made to our various Discourse owned git repos. If we are to use the GitHub provided UI **nobody** will **ever** be allowed to do anything but pull requests. This would slow us down enormously.
> > 
> > - We need the ability to communicate privately without the whole world knowing with regards to certain changes. For example: _We better get this awesome fix deployed to `<insert giant company name>` ASAP, @sam can you take care of it_ ?
> > 
> > - We need the ability to _approve_ changes made or _request follow-up_, this is not something the GitHub UI offers.
> > 
> > - We need the ability to assign particular commits to a user. Say @sam makes a commit [containing some mistakes](https://review.discourse.org/t/dev-this-introduces-a-script-capable-of-caching-critical-dns-locally/109) It is nice that we can directly assign him that particular commit, mark it for followup and then keep track of it being followed up.
> > 
> > - Discourse is pretty fantastic at this whole conversation thing, and the little features make a pretty big difference, I can see when people are typing. I never need to refresh pages for changes to pop up. Quoting is really nice, image uploads are nice, and so on.
> > 
> > - Discourse is really good at read state, you get very strong guarantees that you read every single thing once, with GitHub I have no idea what commits I read and which I did not. We have an incredibly efficient to cope with firehose of information.
> > 
> > And the list goes on…
> > 
> > So review acts as a complement to GitHub, we use GitHub at the moment to cope with changes that have not yet landed. And we use review to properly handle changes that have already landed.

> Last edited by @Moin 2026-09-06T11:16:49Z
> 
> > **Check document**
> >
> > Perform check on document:

---

_[View the full topic](https://meta.discourse.org/t/discourse-code-review/103142)._
