Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It don't work #188

Closed
ngimdock opened this issue May 6, 2023 · 1 comment
Closed

It don't work #188

ngimdock opened this issue May 6, 2023 · 1 comment

Comments

@ngimdock
Copy link

ngimdock commented May 6, 2023

I have this error in my github action steps console

Run peter-evans/create-or-update-comment@v3
/home/runner/work/_actions/peter-evans/create-or-update-comment/v3/dist/index.js:4690
const error = new requestError.RequestError(toErrorMessage(data), status, {
^

RequestError [HttpError]: Resource not accessible by integration
at /home/runner/work/_actions/peter-evans/create-or-update-comment/v3/dist/index.js:4690:21
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
status: 403,
response: {
url: 'https://api.github.com/repos/ngimdock/express-typescript-starter/issues/6/comments',
status: 403,
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',
connection: 'close',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Sat, 06 May 2023 04:37:34 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': '6C82:173A:19743B:353232:6455D98E',
'x-ratelimit-limit': '1000',
'x-ratelimit-remaining': '998',
'x-ratelimit-reset': '1683351219',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '2',
'x-xss-protection': '0'
},
data: {
message: 'Resource not accessible by integration',
documentation_url: 'https://docs.github.com/rest/reference/issues#create-an-issue-comment'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/ngimdock/express-typescript-starter/issues/6/comments',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-core.js/3.6.0 Node.js/16.16.0 (linux; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"body":"This is a multi-line test comment\n- With GitHub Markdown ✨\n- Created by [create-or-update-comment][1]\n\n[1]: https://github.com/peter-evans/create-or-update-comment"}',
request: {
agent: Agent {
_events: [Object: null prototype] {
free: [Function (anonymous)],
newListener: [Function: maybeEnableKeylog]
},
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object: null prototype] { path: null },
requests: [Object: null prototype] {},
sockets: [Object: null prototype] {},
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 0,
maxCachedSessions: 100,
_sessionCache: {
map: {
'api.github.com:443:::::::::::::::::::::': [Buffer [Uint8Array]]
},
list: [ 'api.github.com:443:::::::::::::::::::::' ]
},
[Symbol(kCapture)]: false
},
hook: [Function: bound bound register]
}
}
}

@peter-evans
Copy link
Owner

Hi @ngimdock

There is a note in the readme about this error.

Note: In public repositories this action does not work in pull_request workflows when triggered by forks. Any attempt will be met with the error, Resource not accessible by integration. This is due to token restrictions put in place by GitHub Actions. Private repositories can be configured to enable workflows from forks to run without restriction. See here for further explanation. Alternatively, use the pull_request_target event to comment on pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants