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

Support for PR's from forks! #33

Open
shravanngoswamii opened this issue Jun 29, 2024 · 0 comments
Open

Support for PR's from forks! #33

shravanngoswamii opened this issue Jun 29, 2024 · 0 comments

Comments

@shravanngoswamii
Copy link

I know currently this workflow only supports pull_request events, but it would much better if this can support pull_request_target event too because most PR's usually from contributor's fork! Is there any chance this will be added any soon?

This is what I get now when I used it on pull_request_target event.

Run parkerbxyz/suggest-changes@v1
  with:
    comment: If this PR is not intended to update any previous release, please update the VERSION file to the latest version.
    token: ***
file:///home/runner/work/_actions/parkerbxyz/suggest-changes/v1/dist/index.js:53811
      const error = new RequestError(toErrorMessage(data), status, {
                    ^
RequestError [HttpError]: Resource not accessible by integration - https://docs.github.com/rest/pulls/reviews#create-a-review-for-a-pull-request
    at file:///home/runner/work/_actions/parkerbxyz/suggest-changes/v1/dist/index.js:53811:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///home/runner/work/_actions/parkerbxyz/suggest-changes/v1/dist/index.js:53128:3 {
  status: 403,
  request: {
    method: 'POST',
    url: 'https://github.com/gitapi/repos/shravanngoswamii/docs/pulls/62/reviews',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'suggest-changes octokit-core.js/6.1.2 Node.js/20.13.1 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"event":"REQUEST_CHANGES","body":"If this PR is not intended to update any previous release, please update the VERSION file to the latest version.","comments":[{"path":"VERSION","line":1,"body":"````suggestion\\nv0.33.0\\n````"}]}',
    request: {
      fetch: [AsyncFunction: customFetch],
      hook: [Function: bound bound register]
    }
  },
  response: {
    url: 'https://github.com/gitapi/repos/shravanngoswamii/docs/pulls/62/reviews',
    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',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Sat, 29 Jun 2024 23:48:04 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'istio-envoy',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-accepted-github-permissions': 'pull_requests=write',
      'x-content-type-options': 'nosniff',
      'x-envoy-upstream-service-time': '94',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '2022-11-28',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': '880B:229AB2:3B4D521:6945897:66809D34',
      'x-ratelimit-limit': '5000',
      'x-ratelimit-remaining': '4992',
      'x-ratelimit-reset': '1719708408',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '8',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Resource not accessible by integration',
      documentation_url: 'https://docs.github.com/rest/pulls/reviews#create-a-review-for-a-pull-request',
      status: '403'
    }
  }
}
Node.js v20.13.1
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

1 participant