Giter VIP home page Giter VIP logo

factory-github-utilities's Introduction

FactoryGithubUtilities

Gem to handle interaction with Github API

At present this has one task which is to get the SSH keys of a given Org and Team and return them as an array We use this information to ensure that SSH key data is not statically vendored into various projects

Installation

gem 'factory-github-utilities'

And then execute:

$ bundle

Or install it yourself as:

$ gem install factory-github-utilities

Usage

Generate a secret token in Github's account management

  • The user should be part of the Github Org you want to inspect
  • The token should have org:read permissions
  • The username of the user you generated the token with will be the client-id
  • The generated token will be the client-secret.
require 'factory-github-utilities'
github_team = FactoryGithubUtilities::Team('client-id', 'client-secret', 'org-name', 'team-name')
keys = github_team.keys
puts keys

Development

Setting up DotEnv

Open the .env.example file Update the values with your Org's configuration

You will need to ensure you have granted a token with org:read permissions for the Github user you want to use.

Running Specs

Run rake spec to run the tests. Look in ./coverage/index.html for test coverage metrics from SimpleCov

Note that the specs currently run off live API calls to ensure they are working as expected so the data you need here will have to be valid at the time of running tests.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/factorymedia/factorymedia-github_utilities. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

factory-github-utilities's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.