requestReviewers 404 Not Found
See original GitHub issueBug 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:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
AH, I see. Thanks again, @gr2m! Closing now.