Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hubba

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubba

  • 1.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

hubba

hubba gem - (yet) another (lite) GitHub HTTP API client / library

  • home :: github.com/rubycoco/git
  • bugs :: github.com/rubycoco/git/issues
  • gem :: rubygems.org/gems/hubba
  • rdoc :: rubydoc.info/gems/hubba

Usage

Step 0: Secrets, Secrets, Secrets - Your Authentication Token

Note: Set your GitHub env credentials (personal access token preferred) e.g.

set HUBBA_TOKEN=abcdef0123456789
#   - or -
set HUBBA_USER=you
set HUBBA_PASSWORD=topsecret

Step 1: Get a list of all your repos

Use the GitHub API to get a list of all your repos:

require 'hubba'

h = Hubba.reposet( 'geraldb' )
pp h

File.open( './repos.yml', 'w' ) { |f| f.write( h.to_yaml ) }

resulting in:

geraldb (11):
- austria
- catalog
- chelitas
- geraldb.github.io
- logos
- sandbox
- talks
- web-proxy-win
- webcomponents
- webpub-reader
- wine.db.tools

openfootball (41):
- africa-cup
- austria
- club-world-cup
- clubs
- confed-cup
- copa-america
- copa-libertadores
- copa-sudamericana
- deutschland
# ...

Note: If you have more than one account (e.g. an extra robot account or such) you can add them along e.g.

h = Hubba.reposet( 'geraldb', 'yorobot' )
pp h

Note: By default all your repos from organizations get auto-included - use the orgs: false option to turn off auto-inclusion.

Note: By default all (personal) repos, that is, repos in your primary (first) account that are forks get auto-excluded.

Step 2: Update repo statistics (daily / weekly / monthly)

Basics (commits, stars, forks, topics, etc.)

Use update_stats to to get the latest commit, star count and more for all your repos listed in ./repos.yml via the GitHub API:

Hubba.update_stats( './repos.yml' )

Note: By default the datafiles (one per repo) get stored in the ./data directory.

Traffic (page views, clones, referrers, etc.)

Use update_traffic to to get the latest traffic stats (page views, clones, referrers, etc.) for all your repos listed in ./repos.yml via the GitHub API.

Hubba.update_traffic( './repos.yml' )

Note: Access to traffic statistics via the GitHub API requires push access for your GitHub (personal access) token.

Step 3: Generate some statistics / analytics reports

See the hubba-reports gem on how to use pre-built/pre-packaged ready-to-use github statistics / analytics reports.

That's all for now.

Installation

Use

gem install hubba

or add the gem to your Gemfile

gem 'hubba'

License

The hubba scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.

FAQs

Package last updated on 28 Aug 2023

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