Questions tagged [octokit]

A Ruby toolkit for the GitHub API.

166 questions
0
votes
1 answer

How to find out number of commits to a GitHub repo using Octokit?

I have a private repo on GitHub, which I can estimate the number of commits year-to-date is around 611 by looking at the Commits Graph. However, I cannot get that same number using the Octokit gem. I'm not sure if my results are rate limited, or…
Edward J. Stembler
  • 1,932
  • 4
  • 30
  • 53
0
votes
2 answers

Get user events with Github API and Octokit

I'm trying to make a simple call to retrieve user events on github through octokit. According to the docs I create new client and visit the user events endpoint. client = Octokit::Client.new(access_token: my_token) user = client.user Up to here it…
olimart
  • 1,529
  • 3
  • 17
  • 32
0
votes
1 answer

Where are the "teams" in the GitHub hypermedia API?

Using Octokit, I can traverse link rels to get to "organization" and "members," but I can't seem to find "teams" anywhere. I can get a representation of an org, but the link rels don't include anything for team curl -H "Authorization: token…
Jon Wolski
  • 2,293
  • 2
  • 19
  • 21
0
votes
1 answer

Where to write API object manipulation code in Rails

So I'm building a Github based application with octokit and the rails api, I have the basic idea of what I want to do, but I'm not too sure where to do it. Is it better to manipulate fetched data in the model or in the controller, any help would be…
iandeejay
  • 31
  • 5
0
votes
2 answers

Exceedingly strange ruby '||=' and rspec doubles behavior

Running the following rspec gem versions: * rspec (2.14.1) * rspec-core (2.14.7) * rspec-expectations (2.14.5) * rspec-mocks (2.14.6) * rspec-rails (2.14.1) And octokit 2.7.1 Given the following in spec/support/octokit.rb: # This support…
zealoushacker
  • 6,766
  • 5
  • 35
  • 44
0
votes
1 answer

Is there a quicker way to extract data from Sawyer::Resource via Octokit.rb GitHub API call?

I'm using Octokit.rb to search GitHub users and the response returns a Sawyer::Resource object. I'm currently accessing the data this way: [].tap do |users| @results.items.each do |item| user = item.rels[:self].get.data user = { …
RailsGuy428
  • 5
  • 1
  • 4
0
votes
1 answer

How to Handle OAuth Response with Octokit Ruby vs Restclient

Hi I'm new to Ruby/Rails and I had a question about handling an OAuth response with the Ruby version of GitHub's Octokit. After reading the documentation I'm a little confused about how to follow best practices with the wrapper vs with RestClient.…
RailsGuy428
  • 5
  • 1
  • 4
0
votes
1 answer

Issue adding new deploy key with octokit.rb

I feel like I'm missing something glaringly obvious, but when calling .add_deploy_key I'm getting the following (user and repo below are placeholders): Octokit::UnprocessableEntity: POST https://api.github.com/repos///keys: 422 - Validation …
Chris Ball
  • 131
  • 6
0
votes
2 answers

Moving forward in a for loop despite an error

I have this code: require 'octokit' require 'csv' client = Octokit::Client.new :login => 'github_username', :password => 'github_password' repo = 'rubinius/rubinius' numbers = CSV.read('/Users/Name/Downloads/numbers.csv').flatten # at this point,…
histelheim
  • 4,938
  • 6
  • 33
  • 63
0
votes
2 answers

Converting a clunky ruby function into a foreach/loop?

I have this code: require '/octokit' require '/csv' CSV.open("node_attributes.csv", "wb") do |csv| csv << [Octokit.user "rubinius"] csv << [Octokit.user "sferik"] # add one more request for each piece of information needed end However, it…
histelheim
  • 4,938
  • 6
  • 33
  • 63
-1
votes
1 answer

no implicit conversion of Symbol into Integer: Octokit

This is just an example of the reponse body { "users": [ { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url":…
C-mmon
  • 43
  • 7
-1
votes
2 answers

How to Download Directory from Github

hi i want to download a directory from github account how can i do this? for example i want to download manifest folder from test acount: github.com/test/projectx/manifest I don't want to use github API as much as possible but I tested Octokit It's…
davod kh
  • 23
  • 4
-1
votes
1 answer

Github Repository Details with Repo ID

I am using Octokit Nuget Package for Github. I need to get the result as per the figure attached I am using the following method for getting details of the Repository public JsonResult GetRepositoryDeatil(long id) { var client = new…
Manoj Sethi
  • 1,898
  • 8
  • 26
  • 56
-1
votes
1 answer

How to list just the name of public repositories for a user using Octokit.

Listing of public repository from octokit.I need the names of repositories only not the whole json
-2
votes
1 answer

How to fetch single repository from octokit gem?

I am beginner to ruby I am try to fetch data from "octokit gem" i need information of single repository using it's id, i try a simple code of it but it list out my all repository require 'octokit' => true 2.2.4 :003 > user = Octokit.user…
1 2 3
11
12