Discourse <-> GitHub integration

I enabled a few options on the GitHub plugin, let me know if you see any issues.

  • Github Badges: users should get additional badges based on their contributions, not sure how this will look like
  • GitHub Linkback: Discourse should post on NixOS/* and nix-community/* issues linking back to threads. TODO: create new github account as it’s using mine currently
  • GitHub Permalink: Discourse will transform links to code to perma-links to make the historical context more precise
4 Likes

Linkback: you may want to do that under a separate user, for a number of reasons. (Security, participating status, etc.) example link

1 Like

Badges: I guess that’s the “Great contributor” tag next to our names.

Creating the account currently. I didn’t understand that it was going this way around :slight_smile:

1 Like

Fixed. I now hold nixos-discourse · GitHub . It would be great if I could share the account’s password with the hardware team.

There seems to be an issue where it sends new and new comments when a post on Discourse is edited: whipper: 0.7.0 -> 0.7.2 by Moredread · Pull Request #51302 · NixOS/nixpkgs · GitHub

Weird, the plugin is supposed to handle this case: https://github.com/discourse/discourse-github/blob/50c42d8a0b39106bce72935eb8c216a5c522b50d/app/lib/github_linkback.rb#L84-L86

Not a rubyist but I’d guess it might be that the script is checking for URL including a fragment:

But only storing the flag for fragment-less URL:

Editing the comment to remove the URL fragment indeed does not trigger the bot.

Maybe create a new test github issue and discourse post to reproduce the issue?

Likely fixed by Fix multiple comments on same GH link. by nbianca · Pull Request #4 · discourse/discourse-github · GitHub and related FEATURE: Add support for GitHub issues by nylen · Pull Request #13 · discourse/discourse-github · GitHub.

How often does Discord synchronise with Github? :thinking: I have several accepted PRs but I don’t have a badge fsr.

1 Like

The last person to get it was 9 days ago, are you sure that you linked your GitHub account in the profile preferences?

@flexagoon

Edit: I just got mine, maybe two hours after I linked my account

Hmm, I tried relinking my GitHub account a few weeks ago, and I still didn’t get the badge so far.
I guess for some reason discourse-github doesn’t like my account.

I relinked the account yet again but also added my commit email address to this Discourse. Not sure if that made the difference but I got the badge now.

1 Like