question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

requestReviewers 404 Not Found

See original GitHub issue

Bug Report

Current Behavior

Endpoint 404 not found when try to requestReviewers using context.issue:

module.exports = async context => {
	const comment = context.payload.comment.body;
	const mention = comment
		.match(/\@[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}/gi)
		.map(user => user.slice(1));

	return context.github.pulls.requestReviewers(
		context.issue({
			reviewers: mention
		})
	);
};

Error shown as:

status: 404
...
...
request: {
    method: "POST"
    url: "https://api.github.com/repos/X/X/pulls//requested_reviewers"
    headers: {
      "accept": "application/vnd.github.v3+json",
      "user-agent": "probot/10.9.1 octokit-core.js/3.1.2 Node.js/12.18.4 (linux; x64)",
      "authorization": "token [REDACTED]",
      "content-type": "application/json; charset=utf-8"
    }
    body: "{\"issue_number\":1,\"reviewers\":[\"dwisiswant0\"]}"
    request: {}
}

Expected behavior/code Can requested for a review correctly.

Environment

  • Probot version(s): v10.9.1
  • Node/npm version: v12.18.4/6.14.6
  • OS: Ubuntu 16.04.7 LTS

Possible Solution

N/A.

Additional context/Screenshots I followed code as: https://github.com/kentaro-m/auto-assign/blob/71d1a9c3ba4d5a88326c5e246e5ae120673e38c0/src/handler.ts#L67-L68

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gr2mcommented, Oct 8, 2020

it’s defined in Probot:

https://github.com/probot/probot/blob/8ddac1f6bbbcc92478aaec1c3f406ca3f341f151/src/context.ts#L136-L156

We don’t use any code from https://github.com/actions/toolkit

<div> GitHub</div><div>actions/toolkit</div><div>The GitHub ToolKit for developing GitHub Actions. Contribute to actions/toolkit development by creating an account on GitHub.</div>
0reactions
dwisiswant0commented, Oct 9, 2020

AH, I see. Thanks again, @gr2m! Closing now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Github API Create Issues return 404 Not found - Stack Overflow
Go to "Edit personal access token" page, checkout the "Select scopes" session. Make sure the ...
Read more >
requestReview() | Apple Developer Documentation
For iOS, iPadOS, and apps built with Mac Catalyst, use requestReview(in:) ... To automatically open a page on which users can write a...
Read more >
octokit/rest.js
The name of the repository. The name is not case sensitive. per_page, no. The number of results per page (max 100). page, no....
Read more >
Requisition Requests Page for Reviewers - Overview
Requisition request reviewers can review requests from the Submitted Requisition Requests page. The page displays all requests that are ...
Read more >
Getting started with merge requests - GitLab Docs
From the merge request page, with keyboard shortcuts. ... The merge request Reviewers feature enables you to request a review of your work, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found