Questions tagged [octokit-js]
A JavaScript toolkit for the GitHub API.
octokit-js
87
questions
0
votes
1
answer
24
views
How to make github api request succesfull using PAT for public repositories
ode.js v20.15.0
bikidas@Biki-Das-Distinction-Mac github-api % node index.js
file:///Users/bikidas/github-api/node_modules/@octokit/request/dist-bundle/index.js:106
const error = new RequestError(...
-1
votes
1
answer
46
views
401. Message: Must authenticate to access this API on GitHub Enterprise
What happened?
GItHub Octokit throws 401 error with GitHub App. Here is the code looks like
import dotenv from 'dotenv'
import fs from 'fs'
import http from 'http'
import { Octokit, App } from '...
0
votes
1
answer
59
views
Octokit/git add empty commit to remote branch?
I am trying to make an empty commit to a remote branch. I do no want to make the change locally and then push it up. I do not want to have to make any changes to my local working tree.
Here is what I ...
0
votes
0
answers
30
views
How to Retrieve Organization Members in a GitHub Team Using Octokit and GitHub API?
I'm working on a project where I need to fetch the members of my organization who are assigned to specific teams using the GitHub API and Octokit library in my application. I've been digging through ...
0
votes
1
answer
133
views
Is there a way to resolve a GitHub octokit.js library issue while trying to build the react app?
So I am using React for an application that makes calls to GitHub RESTapi using their octokit sdk.When I run the application using npm start, the application runs perfectly. Only when I use the ...
0
votes
0
answers
35
views
Receiving inaccurate commit and pull request count from GitHub's API
I'm currently building a service that retrieves my GitHub profile's relevant metrics. I've successfully managed to get stargazer, watcher and fork count across all my repositories, but I'm struggling ...
0
votes
1
answer
57
views
Github App Node Middleware rejects all requests when behind a custom path
Using Octokit 3.1.2, this does not work:
import { createServer } from "node:http"
import { App, createNodeMiddleware } from "octokit"
const app = new App({
...
})
createServer(...
0
votes
0
answers
322
views
How can I upload image files GitHub repository programmatically using GitHub PAT / API
I have been getting errors trying to upload image files to my GitHub repo using GitHub API.
I am using JavaScript to perform this function, I already did it for updating text contents on my repo using ...
0
votes
0
answers
68
views
Octokit createNodeMiddleware getting the access code from a Single page app
let url = `https://authentication-url.example.com/api/github/oauth/login`;
this.authWindow = window.open(
url,
'Authorization',
`width=500, height=500, top=300, left=300`
);
...
0
votes
0
answers
38
views
Get public AND private repositories of a user
I am trying to get public and private repos of a user.
So I authorize a user using this user to get the code:
https://github.com/login/oauth/authorize?scope=read:user,repo&client_id=${process.env....
1
vote
0
answers
33
views
How to avoid specifying field name in Octokit GraphQL
Example query:
mutation prrt($input: AddPullRequestReviewThreadInput!) {
addPullRequestReviewThread(input: $input) {
thread {
id
} } }
Using Octokit, I have to type ...
1
vote
0
answers
202
views
Octokit issue in React environment with typescript
I am attempting to use octokit to facilitate GET requests and most importantly get proper type definitions for the responses back from the @octokit/openapi-types. This is what I've tried so far
import ...
0
votes
0
answers
89
views
How to choose only required fields from a returned json object and to store it in the predefined RestultObject
I am using octokit in my typescript project. when I do octokit.request(any_endpoint), it is returning the object of OctokitResponse and it has some fields that are unnecessary for me, but i have to ...
1
vote
1
answer
62
views
How to find the user name who merged the pr to the base branch from the octokit library
Can anyone tell me that how to fetch the user name who merged the pr by the octokit.request api call.
I can fetch all the prs from octokit.request method with the query parameter state=all value. It ...
0
votes
0
answers
221
views
How to access a private github image file with an access_token and render to html
I have an application where a user logs in via oauth, i have access to the user's github access_token.
I want to be able to render a private repository image to html, using the users access_token or ...