Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

404 Error#453

Unanswered
dpolamarasetty asked this question inQ&A
Jan 26, 2024· 2 comments
Discussion options

Hi, I'm new to github actions.I'm trying to post a comment to a PR using the actions/github-script@v7 But i get a 404 error.
Run actions/github-script@v7
RequestError [HttpError]: Not Found
at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:9537:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: 404,
response: {
url: 'https://api.github.com/repos/XX/XXX/issues//comments',
status: 404,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Fri, 26 Jan 2024 01:21:27 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-api-version-selected': '2022-11-28',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': '195C:970D:999A6C:139AB45:65B30917',
'x-ratelimit-limit': '15000',
'x-ratelimit-remaining': '14998',
'x-ratelimit-reset': '1706233117',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '2',
'x-xss-protection': '0'
},
data: {
message: 'Not Found',
documentation_url: 'https://docs.github.com/rest'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/XX/XXX/issues//comments',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'actions/github-script octokit-core.js/5.0.1 Node.js/20.8.1 (linux; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"body":"👋 Thanks for reporting!"}',
request: {
agent: [Agent],
fetch: [Function: proxyFetch],
hook: [Function: bound bound register]
}
}
}
Error: Unhandled error: HttpError: Not Found

Am I missing some of the permissions or setting that is preventing the github-script to post or get data from my repo?

You must be logged in to vote

Replies: 2 comments

Comment options

Running into this exact same issue.

You must be logged in to vote
0 replies
Comment options

I had a similar event.
In my case, I had setcontext.repo.name, so the repo was not configured correctly.
The corrected script is here.

            github.rest.issues.createComment({              issue_number: context.issue.number,              owner: context.repo.owner,              repo: context.repo.repo,              body: 'hoge'            })

https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts
shows, for example, that context.issue.number is not entered unless it is an issue or pull request.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@dpolamarasetty@brendonrapp@ryo-murata

[8]ページ先頭

©2009-2025 Movatter.jp