Skip to content

Conversation

yafengio
Copy link
Contributor

@yafengio yafengio commented Aug 30, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

The notify is not working for non-write access user.

Changes:

  • For pull_request_target : essential for external contributors (those submitting PRs from forks).
  • For pull_request_target: explicitly checks out the PR's head commit.

Which issue(s) this PR fixes:

#7 (comment)

@rootfs
Copy link
Collaborator

rootfs commented Aug 30, 2025

maybe we should have an admin github token?

Changed files: [ '.github/workflows/owner-notification.yml' ]
Failed to assign PR: Resource not accessible by integration
RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:9537:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:132:3)
    at async main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:20) {
  status: 403,
  response: {
    url: 'https://api.github.com/repos/vllm-project/semantic-router/issues/8/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',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Sat, 30 Aug 2025 15:53:05 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-accepted-github-permissions': 'issues=write; pull_requests=write',
      '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': 'C001:32243C:104921E:10B4C08:68B31E61',
      'x-ratelimit-limit': '5000',
      'x-ratelimit-remaining': '4994',
      'x-ratelimit-reset': '1756570461',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '6',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Resource not accessible by integration',
      documentation_url: 'https://docs.github.com/rest/issues/comments#create-an-issue-comment',
      status: '403'
    }
  },
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/vllm-project/semantic-router/issues/8/comments',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'actions/github-script octokit-core.js/5.0.1 Node.js/20.19.4 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"body":"## 👥 Owner Notification\\n\\nThe following owners have been identified for the changed files in this PR and have been automatically assigned:\\n\\n### 📁 `Root Directory`\\n**Owners:** @rootfs, @Xunzhuo\\n**Files changed:**\\n- `.github/workflows/owner-notification.yml`\\n\\n---\\n*This comment was automatically generated based on the OWNER files in the repository.*"}',
    request: {
      agent: [Agent],
      fetch: [Function: proxyFetch],
      hook: [Function: bound bound register]
    }
  }
}

@yafengio
Copy link
Contributor Author

maybe we should have an admin github token?

Changed files: [ '.github/workflows/owner-notification.yml' ]
Failed to assign PR: Resource not accessible by integration
RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:9537:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:132:3)
    at async main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:20) {
  status: 403,
  response: {
    url: 'https://api.github.com/repos/vllm-project/semantic-router/issues/8/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',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Sat, 30 Aug 2025 15:53:05 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-accepted-github-permissions': 'issues=write; pull_requests=write',
      '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': 'C001:32243C:104921E:10B4C08:68B31E61',
      'x-ratelimit-limit': '5000',
      'x-ratelimit-remaining': '4994',
      'x-ratelimit-reset': '1756570461',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '6',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Resource not accessible by integration',
      documentation_url: 'https://docs.github.com/rest/issues/comments#create-an-issue-comment',
      status: '403'
    }
  },
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/vllm-project/semantic-router/issues/8/comments',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'actions/github-script octokit-core.js/5.0.1 Node.js/20.19.4 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"body":"## 👥 Owner Notification\\n\\nThe following owners have been identified for the changed files in this PR and have been automatically assigned:\\n\\n### 📁 `Root Directory`\\n**Owners:** @rootfs, @Xunzhuo\\n**Files changed:**\\n- `.github/workflows/owner-notification.yml`\\n\\n---\\n*This comment was automatically generated based on the OWNER files in the repository.*"}',
    request: {
      agent: [Agent],
      fetch: [Function: proxyFetch],
      hook: [Function: bound bound register]
    }
  }
}

Has secrets.GITHUB_TOKEN been set up in the current repo?

@rootfs
Copy link
Collaborator

rootfs commented Aug 30, 2025

The token needs to be created by repo resource owner @Xunzhuo

@Xunzhuo
Copy link
Member

Xunzhuo commented Aug 31, 2025

@yafengio will close this for now, i will have this issue : )

@Xunzhuo Xunzhuo closed this Aug 31, 2025
@Xunzhuo
Copy link
Member

Xunzhuo commented Aug 31, 2025

it is fixed now : )

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

Successfully merging this pull request may close these issues.

3 participants