# GitHub integration for contributors

**URL:** <https://racket.discourse.group/t/github-integration-for-contributors/200>\
**Category:** Site Feedback\
**Created:** [November 22, 2021, 10:10am UTC](https://racket.discourse.group/t/github-integration-for-contributors/200 "2021-11-22T10:10:01Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [November 22, 2021, 10:10am UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/1 "2021-11-22T10:10:01Z")

</div>

I thought the GitHub integration looked interesting

> Our [tight integration with GitHub](https://meta.discourse.org/t/discourse-github/99895) automates contributor badges and linking between Discourse topics and GitHub issues.  
> ([Free Hosting for Open Source v2](https://blog.discourse.org/2018/11/free-hosting-for-open-source-v2/))

it has two functions

**Assign badges to your users based on GitHub contributions.**

- A small thing but I like the idea of recognising contributors. meta.discourse uses this (screenshot below)

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

- Seems helpful?

These both seem like low impact in that they do no generate additional mailing list messages.

the Discourse GitHub plugin:

> **[Discourse GitHub](https://meta.discourse.org/t/discourse-github/99895)**
>
> :discourse2: Summary Discourse GitHub Allows staff to assign badges to users based on GitHub contributions. Also allows users to create Github Linkbacks and Permalinks 🛠 Repository Link https://github.com/discourse/discourse-github 📖 Install...

[https://meta.discourse.org/badges](https://meta.discourse.org/badges):

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/1X/12b7ac3c0e8d1f0f5ae2016aef157d740299c46b.png)

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [November 22, 2021, 2:26pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/2 "2021-11-22T14:26:29Z")

</div>

Looks interesting. Does it require privileges on the github side?

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [November 22, 2021, 2:30pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/3 "2021-11-22T14:30:06Z")

</div>

> [@jbclements](#):
>
> Does it require privileges on the github side?

requires configuration of a GitHub Access Token as follows;

> #### GitHub Access Token
> 
> In order for the linkback feature to work and the badges to be granted to your users, you need to provide a Github access token. You can generate your token here: [https://github.com/settings/tokens/new](https://github.com/settings/tokens/new).
> 
> The linkback feature requires the `public_repo` scope, and granting badges requires no scope (leave everything unchecked if you only want badges). Since the `public_repo` scope grants **write access** to repositories, we recommend you create a **throwaway Github account** that has access to no repositories and use it just to generate a token.

-- [https://meta.discourse.org/t/discourse-github/99895#github-access-token-9](https://meta.discourse.org/t/discourse-github/99895#github-access-token-9)

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [November 22, 2021, 2:36pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/4 "2021-11-22T14:36:54Z")

</div>

Yes, that looks pretty low-risk. @samth any opinions?

---

<div class="post-metadata">

**Author:** ![samth](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/samth/32/3_2.png) [@samth](https://racket.discourse.group/u/samth)\
**Post date:** [November 22, 2021, 2:48pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/5 "2021-11-22T14:48:06Z")

</div>

I don't have any opinions here.

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [November 27, 2021, 3:53pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/6 "2021-11-27T15:53:42Z")

</div>

I believe I've enabled this, though I don't actually see any evidence of it working yet WRT badges. Let's try linkback:

> <https://github.com/racket/racket/issues/3444>
>
> Currently, the following packages either fail to build, or have test failures, r…egressing from 7.8.
> 
> 7.8 build: https://pkg-build.racket-lang.org
> 7.9 pre-release build: https://plt.eecs.northwestern.edu/release-pkg-build/
> 
> Use check-boxes to indicate "IMO not a release blocker (anymore)"
> 
> \## All packages
> 
> \- \[x\] ("deferred" . (success test-fail))
>   
> Per Sam, known bug in the pkg's tests
> 
> \- \[x\] ("herbie-test-deploy" . (install-conflict build-fail))
> 
> https://plt.eecs.northwestern.edu/release-pkg-build/server/built/archive-fail/herbie-test-deploy.txt
> 
> looks like this might be from me@pavpanchekha.com, probably was supposed to be deleted, sent mail to ask.
> 
> confirmed via email, meant to be deleted.
> 
> \- \[\] ("quickscript-test" . (success test-fail))
> 
> sent email to ask about this
> 
> \- \[x\] ("runomatic" . (no-docs build-fail))
> 
> looks like a transient pkg dependency failure, wait for re-run
> 
> \- \[\] ("rwind" . (no-docs test-fail))
> 
> per Sam, "different environment on the release-pkg-build server"
> 
> \- \[\] ("sass" . (success test-fail))
> 
> discussion below, not sure why the shared library doesn't load
> 
> \- \[x\] ("zeromq-r" . (success test-fail))
> 
> see discussion below.
> 
> \- \[x\] ("gtp-benchmarks" . (success test-fail))
> 
> https://plt.eecs.northwestern.edu/release-pkg-build/server/built/test-fail/gtp-benchmarks.txt
> 
> no idea what's going on here yet.

Wow, what an awesome issue. It's my favorite.

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [November 27, 2021, 3:54pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/7 "2021-11-27T15:54:25Z")

</div>

Yes, okay, that worked. Yay! Still haven't seen any evidence of the badges.

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [November 27, 2021, 6:00pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/8 "2021-11-27T18:00:45Z")

</div>

Doesn’t look like the badges are enabled on  
[https://racket.discourse.group/badges](https://racket.discourse.group/badges)

Was expecting a development section like

[https://meta.discourse.org/badges](https://meta.discourse.org/badges)

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/1X/76aec629e8e41a35c00c71509b5f110b8acbe4b5.jpeg)

---

<div class="post-metadata">

**Author:** ![SamPhillips](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/samphillips/32/15_2.png) [@SamPhillips](https://racket.discourse.group/u/SamPhillips)\
**Post date:** [November 27, 2021, 11:04pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/9 "2021-11-27T23:04:15Z")

</div>

Looks like it may be working now?

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/1X/80a39fd6d60aa3c164df29b43f371999c0168c63.png)

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [November 28, 2021, 12:28am UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/10 "2021-11-28T00:28:49Z")

</div>

Looks awesome 🎉

There are quite a lot of contributors!

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [November 28, 2021, 9:25am UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/11 "2021-11-28T09:25:05Z")

</div>

What about racket/math, racket/draw, racket/gui etc.?

How does the plugin find the connection between the Discourse and the Github user?

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [November 28, 2021, 11:15am UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/12 "2021-11-28T11:15:42Z")

</div>

For the badges

> Add one or more URLs of the GitHub repos to scan for contributions to the `github badges repos` site setting.

For the link backs

> 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

It’s documented at [https://meta.discourse.org/t/discourse-github/99895](https://meta.discourse.org/t/discourse-github/99895)

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [November 28, 2021, 4:30pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/13 "2021-11-28T16:30:53Z")

</div>

@spdegabrielle

Instructions unclear 🙂

Is the user, the Discourse maintainer or the Github repo owner that needs to do something?

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [November 28, 2021, 4:41pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/14 "2021-11-28T16:41:43Z")

</div>

It’s a discourse admin setting from what I can tell from the docs.

There also seemed to be some lag so I’m guessing it is something like a nightly cron job, so maybe give it a chance to catch up.

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [November 28, 2021, 5:48pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/15 "2021-11-28T17:48:30Z")

</div>

Details: I think there are two fairly separate pieces of functionality here. I think the linkback one is the simpler one, and perhaps you've already observed it. If you mention a github issue in a discussion on discourse, like this:

> <https://github.com/racket/racket/issues/3444>
>
> Currently, the following packages either fail to build, or have test failures, r…egressing from 7.8.
> 
> 7.8 build: https://pkg-build.racket-lang.org
> 7.9 pre-release build: https://plt.eecs.northwestern.edu/release-pkg-build/
> 
> Use check-boxes to indicate "IMO not a release blocker (anymore)"
> 
> \## All packages
> 
> \- \[x\] ("deferred" . (success test-fail))
>   
> Per Sam, known bug in the pkg's tests
> 
> \- \[x\] ("herbie-test-deploy" . (install-conflict build-fail))
> 
> https://plt.eecs.northwestern.edu/release-pkg-build/server/built/archive-fail/herbie-test-deploy.txt
> 
> looks like this might be from me@pavpanchekha.com, probably was supposed to be deleted, sent mail to ask.
> 
> confirmed via email, meant to be deleted.
> 
> \- \[\] ("quickscript-test" . (success test-fail))
> 
> sent email to ask about this
> 
> \- \[x\] ("runomatic" . (no-docs build-fail))
> 
> looks like a transient pkg dependency failure, wait for re-run
> 
> \- \[\] ("rwind" . (no-docs test-fail))
> 
> per Sam, "different environment on the release-pkg-build server"
> 
> \- \[\] ("sass" . (success test-fail))
> 
> discussion below, not sure why the shared library doesn't load
> 
> \- \[x\] ("zeromq-r" . (success test-fail))
> 
> see discussion below.
> 
> \- \[x\] ("gtp-benchmarks" . (success test-fail))
> 
> https://plt.eecs.northwestern.edu/release-pkg-build/server/built/test-fail/gtp-benchmarks.txt
> 
> no idea what's going on here yet.

Then the discourse bot adds a public comment to that issue that links back to this discussion. This should currently be enabled for all of the racket/\* repos at github.

The 'badge' piece seems to be almost entirely separate; I believe the github plugin is actually a rewritten combination of two older plugins. For this plugin it appears that we have to add each repo of interest one at a time, no wildcards. (And at this point, I've only added the one repo, racket/racket.) However, you ask a really good question about badge linkage; I have to assume that it's done by email address; that is, the email address associated with the commit has to be the same one associated with the discourse account. I realize that many people (such as myself!) use many different email addresses, and my guess is that in this case, the badges won't work.

I think linkbacks could wind up being useful. The badges... well, we'll see.

John

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [November 28, 2021, 5:58pm UTC](https://racket.discourse.group/t/github-integration-for-contributors/200/16 "2021-11-28T17:58:22Z")

</div>

Added a bunch more repos for badge consideration, in order of most-recently-updated. There's no really fair way to do this that doesn't involve adding dozens and dozens of repos.
