Tighter integration between Discuss and GitHub?
Do we want tighter integration between the forum and GitHub? User Levels 1+ please vote here.
We have access to the features that this plugin provides, namely:
- GitHub Linkback: If someone mentions a PR/Commit here then have a bot automatically make a comment including a link to the Discuss thread as a comment in the respective PR/Commit
- GitHub Badges: Allows for automatic badges based on contributions to repos
Both of the above are able to be limited to specific orgs/repos.
- Yes to both
- Linkback only
- Badges only
- Neither
0 voters
Added GitHub integration, you’ll now see the user discuss-daml make comments in PRs and commits on GitHub if you reference them here.
Badges are also enabled so if you have enough commits to digital-asset/daml you should get badges but I’m not sure how it ties together users yet (maybe email) so we’ll see if it works 
EDIT: Looks like it does email and screenname matching so hopefully this works out well enough.
github.comdiscourse/discourse-github/blob/07248f6442868c307aa3f7130d1d0ccc5ce73e0d/app/lib/github_badges.rb#L23
- class Granter
- def initialize(emails)
- @emails = emails
- @badges = []
- end
-
- def add_badge(badge, as_title:, threshold:)
- @badges << [badge, as_title, threshold]
- end
-
- def grant!
- email_commits = @emails.group_by { |e| e }.map { |k, l| [k, l.count] }.to_h
-
- regular_emails = []
- github_name_email = {}
- @emails.each do |email|
- match = email.match(/\A(\d+\+)?(?<name>.+)@users.noreply.github.com\Z/)
-
- if match
- name = match[:name]
- github_name_email[name] = email
Does this have any impact on some people not being able to include GitHub URLs at all? I’m trying to create a separate topic with some GitHub links and am getting an error: “Sorry you cannot post a link to that host.”
You got flagged by an anti-spam measure because you’re a new user posting too many links to github too fast. You should be all good to go now.