Discourse <-> GitHub integration


#1

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

#2

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


#3

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


#4

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


#5

Fixed. I now hold https://github.com/nixos-discourse . It would be great if I could share the account’s password with the hardware team.


#6

There seems to be an issue where it sends new and new comments when a post on Discourse is edited: https://github.com/NixOS/nixpkgs/pull/51302


#7

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


#8

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:


#9

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


#10

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