Can badges be awarded by an external site?

AI-generated summary

The discussion explores whether badges can be awarded by an external site in Discourse. michael28 asks about integrating badge awards for actions performed on an external site, noting that SSO is already set up. erlend_sh points out the existing “Contributor” badge, which is awarded for contributing an accepted pull request, suggesting it might be manually assigned. sam confirms that badge assignment is currently manual. michael28 expresses that the missing piece is adding a route to assign badges to users automatically, indicating a desire for automated badge assignment from external systems.

I’m currently configuring my Discourse instance (loving it by the way - great job guys!) to go with my site. I’ve gotten SSO going successfully, and am now in the process of setting up the badge system. I’d like to award badges for actions completed on the site, with Discourse acting as a sort of hub for profiles and discussion.

I know there are APIs for things like topics, search etc but wasn’t sure how I’d go about this. Hoping someone can point me in the right direction!

2개의 좋아요

Wondering about this too. I noticed there’s a “Contributor” badge with the following description:

contributed an accepted pull request

Maybe it’s manual right now, but to automate that one would have to hook Discourse up with the GitHub API.

1개의 좋아요

Its not manual:

https://github.com/discourse/github_badges

3개의 좋아요

Ah that’s great, thanks Sam!

It seems the only missing piece of the puzzle for what I’m trying to achieve is that I need to add a route for assigning a badge to a user immediately rather than having a job to do it once a day.

I’ve searched around a bit and can only find fairly old topics on this - what’s the best way for me to go about it?