Questions tagged [octokit]

A Ruby toolkit for the GitHub API.

166 questions
4
votes
1 answer

Download code from GitHub using octokit.net

I want to download code from public and private repository from GitHub. For this purpose I choosed octokit.net, but i have big problem to understand how I should use this lib to achieve my goal. Generally it should be done via new GitHubClient…
Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107
4
votes
2 answers

How to make request by Octokit client

I'm using token to access github api by Octokit client. client = Octokit::Client.new(access_token: TOKEN) It seems that is ok: client.rate_limit => #
megas
  • 21,401
  • 12
  • 79
  • 130
3
votes
1 answer

Upload assets with Octokit

I'm reading the docs at https://docs.github.com/en/rest/reference/releases#upload-a-release-asset but I don't see the page describing how to actually upload the asset? All I can see is the page saying I should upload as binary but do I actually use…
justadev
  • 45
  • 4
3
votes
1 answer

Cannot connect to Github account using octokit

I fail to connect to GitHub and get my account credential using the "octokit" gem. client = Octokit::Client.new( client_id: ENV['GITHUB_CLIENT_ID'], client_secret: ENV['GITHUB_CLIENT_SECRET'], ) Gem File: ruby '2.7.2' gem 'rails', '~>…
3
votes
0 answers

503: Service Unavailable AWS Lambda with Github Probot

I'm trying to receive webhooks from Github using a probot application, but every single time I try this, I get a {"message":"Service Unavailable"} error. Github sends this payload to an AWS Lambda function, and by googling (i think) this is an issue…
Ganning Xu
  • 263
  • 4
  • 13
3
votes
2 answers

Get the latest workflow run from GitHub Actions using the Octokit API

I'm using the Octokit API to request a specific workflow run. I can see in the documentation that I can request a specific workflow run by providing a workflow run ID. However I would like to always request the latest workflow run. How do I achieve…
3
votes
0 answers

List github issue revisions - octokit

I'm developing a probot application to prevent disclosure of sensitive information on github issues. When I edit out the sensitive information from the github-issue, the information can still be viewed on the post's edit history (revision history)…
Zaiton
  • 31
  • 6
3
votes
1 answer

jekyll minimal mistakes theme throwing "uninitialized constant Faraday::Error::ClientError (NameError)"

I'm new to using jekyll and tried installing the minimal-mistakes-jekyll theme as a gem. Added the gem minimal-mistakes-jekyll to my gemfile, updated it with the bundle command, and set it as theme in _config.yml on a directory created by jekyll new…
yungbl00d
  • 33
  • 5
3
votes
2 answers

Why do I get a 404 response when I try to post to github API whilst authenticated with oauth access tokens?

I am using the passportjs library to authenticate users into the application. An access token is usually generated when users authenticate successfully with passportjs. I am attempting to create a branch with the github API with this access token…
3
votes
1 answer

GitHub Octokit/rest.js OAuth for Single Page Applications

I am using the GitHub API client 'octokit/rest.js' in an Angular single page application (SPA). Given that it is generally more secure and that I use 2 factor authentication for my GitHub account (password alone is not enough) I wanted to make use…
peter554
  • 1,248
  • 1
  • 12
  • 24
3
votes
0 answers

Node JS Octokit Authentication and Storing Github Token

Goal I am attempting to create my first CLI using Node JS following the instructions outlined in a tutorial on Sitepoint (refer: https://www.sitepoint.com/javascript-command-line-interface-cli-node-js/). For those attempting to ask why I would…
Isaiah Davis
  • 81
  • 2
  • 9
3
votes
1 answer

Authentication of a Github App with @octokit

I use @octokit/rest to access github and try to authenticate with the authenticate() function. const credentials = { type: 'oauth', key: process.env.GITHUB_ID, secret: process.env.GITHUB_SECRET } octokit.authenticate(credentials) I've got the…
JSchirrmacher
  • 3,243
  • 2
  • 19
  • 27
3
votes
0 answers

Github API extremely slow request with Octokit

trying to query the github api with octokit, I have the following function which takes 3-4 minutes, does anyone see an obvious problem for why it takes so slow ? I'm trying to find the top contributors within an organization, by looping through…
sco
  • 367
  • 3
  • 14
3
votes
1 answer

Octokit returning one pull request rather than all issues

I wish to retrieve all issues from a GitHub repository in my Node.js application. I've used octokit to do this. From the documentation I gather I must use repo.getIssueEvents() but this just returns the 1st pull request which is not what I…
runnerpaul
  • 5,942
  • 8
  • 49
  • 118
3
votes
1 answer

GitHub API: Cannot reliably add files to repository

I experience a very weird error with the GitHub API using the Octokit Ruby library. Only sometimes API requests to add new files to a repository fail with the following message: Octokit::UnprocessableEntity: PUT…
heroxav
  • 1,387
  • 1
  • 22
  • 65
1
2
3
11 12