New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

octo_ranker

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

octo_ranker

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

OctoRanker

Git ranked.

OctoRanker can rank the members of an organization based on their contributions to the organization's public repositories. You should probably read the whole README, but at the very least, please read the organizational usage.

Installation

Add this line to your application's Gemfile:

gem 'octo_ranker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install octo_ranker

Usage

Programmatic

Using OctoRanker is very straightforward. It goes like this:

require 'octo_ranker'
OctoRanker.rank_members('name-of-my-org')

This will give you an array of OctoRanker::User objects. You can read the docs to find out how the rankings are calculated.

Rate Limiting

GitHub uses rate limiting. You can read about their policies here. Depending on the size of your organization, this may cause some errors to be thrown once GitHub starts responding with 429s.

To increase your rate limit, you can configure octokit (which is what OctoRanker uses to get data from GitHub) to authorize with your GitHub credentials like so:

require 'octo_ranker'
Octokit.configure do |c|
  c.login = 'ajm188'
  c.password = 'password' # Obviously not my real password (or is it?), but you get the idea.
end
# Now make your queries as normal
OctoRanker.rank_members('name-of-my-org')

If your organization is so large that you're maxing out the authenticated rate limit (wow, good for you!), create an issue in here, and I'll try to come up with a good batch processing solution.

Organizational

OctoRanker is intended to be a fun way to encourage members of your organization to contribute to your repos. The rankings should provide friendly competition and motivation to get more involved with your organization's open source software.

Things you should not do if your organization uses rankings:

  • "Dood, you suck. You have, like, the worst ranking in our org."
  • Make a bunch of really small commits to boost your ranking. That's not the point.

Things you should do instead:

  • Be kind and encouraging to your fellow teammates. You're on the same team after all.
  • Focus on making contributions to your organization, and not on your ranking. After all, the more you focus on making contributions, the better your ranking will be as a result.

Contributing

  1. Fork it ( https://github.com/ajm188/octo_ranker/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Potential Features

These are some things I'm considering adding to the project. If you want to work on one (or any) of them, feel free. Just let me know so I don't duplicate your effort (duplicated effort is lame). Also see contributing for the workflow.

  1. Batch processing of org repos. See rate limiting.
  2. Option to count private repos. Note that this will require authentication from a member of the organization.
  3. Add some tests. I've seen the code work, but why should you trust me?
  4. This isn't a "feature" per se, but I might as well stick this here and hope someone else does it for me.

FAQs

Package last updated on 10 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc