Discourse GitHub


(Maja) #1

This plugin combines functionality of deprecated github_badges and discourse-github-linkback plugins.

Repository URL



Follow the plugin installation guide.

Github Badges

Assign badges to your users based on GitHub contributions.

How to use:

  1. Enable github badges enabled in Settings -> Plugins.
  2. Add URL of the GitHub repo to scan for contributions to the github badges repo site setting.

Github Linkback

Create a link from a Github pull request or commit back to a Discourse post where it is mentioned.

How to use:

  1. Enable github linkback enabled in Settings -> Plugins.
  2. Generate an access token on Github. Be sure to give it only the public_repo scope. Paste that token into the github linkback access token setting.
  3. Finally, add the projects you wish to post to in the github linkback projects site setting in the formats:
    • username/repository for specific repositories
    • username/* for all repositories of a certain user

Github Permalink

Replace Github non-permalinks with permalinks.

How to use:

  1. Enable github permalinks enabled in Settings -> Plugins.

(Raphaël Jadot) #2

Hi, I hope this is the good place to ask for help:

  • Is there a way to troubleshoot the linkback? It worked well with previous plugin but am not anymore able to make it work. I recreated the access token in case…
  • I don’t understand how badges work…

(Joshua Rosenfeld) #3

Yep, this is a fine place. I’ve asked my colleague @maja to assist when she’s back next week, she did the work combining the plugins.

I can confirm that linkback is still working for us here on Meta since we switched plugins, so I’m not sure what’s happening there.

(Raphaël Jadot) #4

Thanks Joshua,

I guessed indeed the plugin has been tested and validated, I’m uncomfortable not to be able to provide any further relevant information about my issue…

edit: in the settings, is the dropdown box labelled “List of projects to link back from” supposed to display filtered results when you start writing in it?

(Maja) #5

I’m not sure what’s causing problems since the new discourse-github plugin is reusing the old site settings and code didn’t change either. Did you manage to find anything meaningful in the logs? Is the old discourse-github-linkback still installed? Perhaps that’s interfering with the new plugin.

The dropdown for github linkback projects is used only for creating new entries, it doesn’t have any collection of options to filter from.

(Raphaël Jadot) #6

Thanks for reply @maja, it seems there is something I misunderstood in rights of categories in which there is a thread that should be linked back. Apparently the category needs to writeable by everyone or it doesn’t work, I’m not sure yet but it seems that my issue comes from the fact “everyone” can only “see” and not “Create / reply /see” (I need to make some tests to confirm)

edit: well, I don’t understand, it worked once after I set my testing category with rights “everyone” "can “create/reply/see” so I tried the same change in “production” category: it did not work. Furthermore, it stopped to work in my testing category just after. I can’t find anything related in logs page, but maybe there is another way to troubleshoot?

edit2: it seems really related to rights. Sorry for noise, please consider my issue as non-issue. However it may be interesting to know the way to easily troubleshoot this plugin, if there is :slight_smile:

(Anton) #7

Is there an alternative, more generic, “any-git-repository” plugin?

(Jeff Atwood) #8

What does this mean?

(Anton) #9

I mean to automate the following relationship between Discourse and an arbitrary git repo:

… and to grant badges based on contributions in the repo:

Does it make any sense?
Sorry for not being clear in the original post.


I think this plugin could be much more useful if the number of PRs could be configured in settings for each kind of badge.

I’m refering to these 2 values

  • silver badge:
  • gold badge

Another useful feature could be that the badges granter could use the same repositories (more specifically the username/* notation) as the linkback part.