Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
Using GitHub API to create new issue

I'm trying to create a GitHub issue using the GitHub API, and I found this https://github.com/ceceliacreates/APITools which is exactly what I need, but it keeps showing me my GitHub API was not found.

Following is the code:

createIssuesFromJSON = function(file) {
    file.forEach(issue => {
        fetch(`https://api.github.com/repos/${user}/${repo}/issues/`, {
            method: 'POST',
            body:    JSON.stringify(issue),
            headers: {'Content-Type': 'application/json', 'Authorization': `${process.env.TOKEN}`}
        })
        .then((res)=>{
            console.log(res);
            return res.json();
        })
        .then(json => {
            
        })
    })
}

createIssuesFromJSON(file);

error: 404 URL not found

I was checking the official GitHub website for the API usage, but I can't find anything wrong. Can anyone help me with the situation?

[Symbol(Response internals)]: {
    url: 'https://api.github.com/repos/{my github}/{my repo}/issues/',
    status: 404,
    statusText: 'Not Found',
    headers: Headers { [Symbol(map)]: [Object: null prototype] },
    counter: 0
  }
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

That code is from github.com/ceceliacreates/APITools/CreateIssuesFromJSON/CreateIssuesFromJSON.js.
Except with fetch("https://api.github.com/repos/${user}/${repo}/issues")

It seems to follow the header I mentioned before.

You need to double-check the token used, and its associated scope.

And try to use the library itself.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!