# 贡献者和卓越贡献者徽章是如何分配的？

**URL:** <https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251>\
**Category:** Product Support\
**Created:** [2016 年4 月 8 日 18:00 UTC](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251 "2016-04-08T18:00:23Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

作者： ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
发布日期： [2016 年4 月 8 日 18:43 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

```

---

_[View the full topic](https://meta.discourse.org/t/how-are-contributor-and-great-contributor-badges-assigned/42251)._
