Unable to Authenticate as Github App with Octokit/rest

I'm unable to authenticate as an app using Octokit/rest and the documentation as failed me... Here's my routine for authenticating: ```typescript async function getGithub({payload}) { const...

Octokit REST API getClones returning strange TypeScript type

I'm using the Octokit REST API to grab the clones in my repo. I'm trying to get the to the telemetry with the timestamp. When I call the getClones() API VS code tells me this TypeScript...

ASP .Net Core 3.1 octokit rest npm package issues

I use npm and a gulpfile.js to essentially export npm packages to a 'lib' folder under 'wwwroot'; this works a treat and whenever I update a specific npm package if it's in my gulpfile.js watch...

octokit-rest node-js: authorising username and password gets "Token passed to createTokenAuth is not a string" error

EDIT: Despite trying to make it work for 5+ hours, I just saw that the method I describe below is actually deprecated. Anyone who's fallen into the trap I did should use access tokens instead...

Adding a user as collaborator of an github organization with octokit ends in 404

I want to add GitHub users as collaborators of an organization repository using NodeJS octokit/rest library. The library and manually sent requests to GitHub API repond with HTTP 404 - Not Found,...

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:...

List all unresolved pull request comments

We are using the @octokit/rest client to fetch all of the comments on a pull request: client.pulls.listComments({ owner, repo, pull_number: 34, per_page: 100 }).then(result =>...

Octokit rest.js throws a httpError: Not Found

Im trying to update an existing gist using Octokit. I can successfully get the gist but I cannot update the gist. It always throws an httpError: Not Found. Heres my code: ``` const request =...

How to get more results from the octokit api?

I want to get all the repos from github using octokit. So I use throttling and paginateRest and restEndpointMethods plugins. But no matter what is my search query it's return 1020 results...

Token passed to createTokenAuth is not a string : octokit, auth-token

I am trying to build a GitHub App and following the https://probot.github.io/docs/ and https://octokit.github.io/rest.js/v17#authentication. It is basically a nodejs app. I have no experience...

Use Octokit or the GitHub Rest API to upload multiple files

I'm trying to write a method which takes files from a path and uploads them to a GitHub repo. The files have to remain intact and separate (can't zip them). This is what I've got so...

Is there anyway to get the current state of job within the steps in github actions?

I have been working on the github actions and I need to send the message about the reason of failure on the external webhook. I tried to use the octokit rest js in the nodejs action, but Since the...

GitHub API v4 Graphql: Get current authorized user organizations and their repositories

In GitHub API v3 with repo and user authorization scopes, I can get my organizations with GET /user/orgs (https://developer.github.com/v3/orgs/#list-organizations-for-the-authenticated-user, with...

How to download a github release by code, not by a CLI

I am making a bot that can grab a source.zip / source.targz from Github, then implement it into my app and new changes are applied, but I have not found a way to download a release because the...

Why am I losing typing of a parameter with spread operator?

By using a Octokit package I'd like to list all pull requests (client.pulls.list). I have a GitHubClient (wrapper for Octokit) and GitHubService (wrapper for GitHubClient). The GitHubService has...

Using inheritance or modules in Ruby

I'm creating an API wrapper so I've been looking at other libraries to get some ideas on how to structure it. I found that a lot of libraries mix in all their methods in a Client class instead of...

ocotkit unable to get organisation private repo commit

I am using octokit with node and trying to get single commit detail but getting 404 generated personal access token, owner etc. for my private repo it's working but for organization Private...

How retrieve organisation's repositories with Github API?

I'm to working with Github API to trying to retrieve sha of the last commit of a specific branch. To be precise, the repository that I target is managed by an organisation. I would like to use it...

How to Invite users to Github organisation using Octokit.net

To connect to Github API, I am using Octokit NuGet package (C#). Although I can find most of what I need, I can't seem to find how to invite users (via email) to my organisation. I am looking for...

How do I convince webpack to use the node imports over web imports when using `target: node`

First the code, it's a pretty silly example but it's pulled out from a more complicated github action: index.js js require('@octokit/rest'); console.log('hello...

C#: Download Release Asset from Github

I want to download release asset zipball´s in a C# application for further use. I´m using Octokit to get all release informations from the repo, including the respective browserdownload_url. After...

Check if a new pull request was created

Is it possible to check every x seconds and determine if a new pull request was created on a github repository, and perform a function on it (I am using the JavaScript library @octokit/rest)? So...

Orchestrated sequence of async REST API calls using Reactive Extensions (Rx)

I am trying to build a service layer which provides some data by making a coordinated sequence of REST API calls using Reactive Extensions. For the sake of this question, I am using observable...

Can't find globally installed npm packages in Travis ci

The .travis.yml file is: language: node_js node_js: - node env: global: - secure: "[redacted]" before_install: - node ./bin/version_check.js install: - npm i - npm i -g codecov -...

Sharing authentication across local resources

My web application has a main site, which uses Oauth to log in via a 3rd party service (in this case, it's Github). To preserve the logged in state, the Access Token is stored in a session. So far...

github API using ocotokit: cannot create/update file for personal repos (no organization)

I created a github app. when user authorize the app I can access his organizations repos: list repo, branches, create and update files. when the repos are not organization repos, (regular repos),...

jasmine spy not finding property

I have a file that basically looks like this(shortened) const octokit = new (require("@octokit/rest"))(); function buildRepo(name) { fs.promises ...

How to Return Github Issues from Private Repository (Node.js)

I am trying to return a list of Github issues from a private repo using Node.js. I am able to return a list of the repos, but am struggling to return the issues. It appears that you can list the...

Create React App doesn't properly mock modules from __mocks__ directory

I have a working example with Jest and mocks from __mocks__ directory that works : With simple Jest setup json // package.json { "name": "a", "version":...

Cannot access/delete the Secret Gists from Github Account even with correct Auth details

I have searched a very lot for this but couldn't found anything useful, and I am not a fluent Nodejs developer. I am trying to delete my old and outdated secret gists from my Github Account with...