# How are Contributor and Great Contributor badges assigned?

**URL:** https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251
**Category:** Support
**Created:** [April 8, 2016, 6:00pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251 "2016-04-08T18:00:23Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [April 8, 2016, 6:00pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251/1 "2016-04-08T18:00:23Z")

</div>

So I have quite a few accepted PRs, but I’m not seeing how these are being assigned.

I did verify that my email address here matches the one I use on GitHub.

I’m wondering if I need to re-login using GitHub here on Meta to refresh some data. As I did recently alter one of my GitHub email addresses.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [April 8, 2016, 6:14pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251/2 "2016-04-08T18:14:47Z")

</div>

Did you use your current Discourse email address for all your commits? It doesn’t matter which email you use for authentication on Github. The only thing that matters is the email address that you include in your commits. When you commit as `"Foo Bar <foo.bar@example.com>"` then you need to use `"foo.bar@example.com"` here on meta too.

You won’t get the badge as long as your email addresses do not match. But I guess someone from the team could grant to the badge manually. 🙂

Take a look at the plugin source in order to see what’s happening. I highlighted the important parts:

> <https://github.com/discourse/github_badges/blob/master/plugin.rb#L44-L53>

BTW: Didn’t you [ask the same a long time ago](https://meta.discourse.org/t/how-to-get-the-contributor-badge/19086)? 😉

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [April 8, 2016, 6:19pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251/3 "2016-04-08T18:19:39Z")

</div>

Seems I did, but obviously it worked and now it is gone again…oh well, probably show how the same issue.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [April 8, 2016, 6:25pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251/4 "2016-04-08T18:25:17Z")

</div>

Yeah, all the badges were lost about two weeks ago and had to be granted again…

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [April 8, 2016, 6:26pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251/5 "2016-04-08T18:26:23Z")

</div>

No, it definitely isn’t that… As I see many others with the badges, but it must something with the way the prior commits are. So there is likely nothing I can do about it now.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [April 8, 2016, 6:43pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251/6 "2016-04-08T18:43:48Z")

</div>

Well, they can certainly award it manually. 😉

But the plugin will need an update anyway since some of the pull requests are not recognized anymore. The “Merge pull request” commits are missing… Maybe it’s time to use the Github API. 🙂

Oh, and this simple script lists the number of pull requests and the corresponding email addresses the same way as the plugin does:

```ruby
emails = []
path = '/path/to/discourse/repo'

`cd #{path} && git log --merges --pretty=format:%p --grep='Merge pull request'`.each_line do |m|
  emails << (`cd #{path} && git log -1 --format=%ce #{m.split(' ')[1].strip}`.strip)
end

email_commits = emails.group_by { |e| e }
                  .map { |k, l| [k, l.count] }
                  .sort { |a,b| a[1] <=> b[1] }

email_commits.each do |email, commits|
  print "#{commits}\t#{email}\n"
end

```

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [April 8, 2016, 6:53pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251/7 "2016-04-08T18:53:09Z")

</div>

lol, that is exactly what I was “recreating” locally right now. Fairly certain there isn’t much I can do. As the email address I started with (over a year ago), I won’t be re-enabling.

**Edit:** Just confirmed that is what it is… oh well.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [April 8, 2016, 8:05pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251/8 "2016-04-08T20:05:35Z")

</div>

If anyone wants to improve this plugin, see also:

> [@Badges based on GitHub contributions!](https://meta.discourse.org/t/badges-based-on-github-contributions/30922):
>
> Continuing the discussion from [Badges feedback](https://meta.discourse.org/t/badges-feedback/13789/52): Is it a plugin? I need it for my community! How can I add it to my installation? Does it work currently? Thanks

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251/9 "2024-06-08T12:45:44Z")

</div>

This topic was automatically closed after 2982 days. New replies are no longer allowed.
