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

Failed step "success" of plugin "@semantic-release/github" #738

Open
hashem78 opened this issue Nov 12, 2023 · 5 comments
Open

Failed step "success" of plugin "@semantic-release/github" #738

hashem78 opened this issue Nov 12, 2023 · 5 comments

Comments

@hashem78
Copy link

hashem78 commented Nov 12, 2023

I'm getting this error on the final step of my action, weirdly enough it releases and tags correctly but the error appears nonetheless.

here's the relevant part from my .releaserc

[
            "@semantic-release/github",
            {
                "successComment": false,
                "assets": {
                    "path": "some-path",
                    "name": "some-name",
                    "label": "some-label"
                }
            }
        ]

this is the relevant part of the workflo

      - name: Semantic Release
        uses: cycjimmy/semantic-release-action@v4
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

here's the error dump

Error Dump
 [9:25:46 AM] [semantic-release] › ✘  Failed step "success" of plugin "@semantic-release/github"
[9:25:46 AM] [semantic-release] › ✘  An error occurred while running semantic-release: RequestError [HttpError]: Validation Failed: {"message":"The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.","resource":"Search","field":"q","code":"invalid"}
    at /home/runner/work/_actions/cycjimmy/semantic-release-action/v4/node_modules/@octokit/request/dist-node/index.js:112:21
Error: AggregateError: 
    HttpError: Validation Failed: {"message":"The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.","resource":"Search","field":"q","code":"invalid"}
        at /home/runner/work/_actions/cycjimmy/semantic-release-action/v4/node_modules/@octokit/request/dist-node/index.js:112:21
        at async requestWithGraphqlErrorHandling (/home/runner/work/_actions/cycjimmy/semantic-release-action/v4/node_modules/@octokit/plugin-retry/dist-node/index.js:71:20)
        at async Job.doExecute (/home/runner/work/_actions/cycjimmy/semantic-release-action/v4/node_modules/bottleneck/light.js:405:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async requestWithGraphqlErrorHandling (/home/runner/work/_actions/cycjimmy/semantic-release-action/v4/node_modules/@octokit/plugin-retry/dist-node/index.js:71:20)
    at async Job.doExecute (/home/runner/work/_actions/cycjimmy/semantic-release-action/v4/node_modules/bottleneck/light.js:405:18) {
  status: 422,
  response: {
    url: 'https://api.github.com/search/issues?q=in%3Atitle+repo%3AMYORG%2FMYREPO+type%3Aissue+state%3Aopen+The%20automated%20release%20is%20failing%20%F0%9F%9A%A8',
    status: 422,
    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',
      'cache-control': 'no-cache',
      'content-length': '301',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Sun, 12 Nov 2023 09:25:46 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      vary: 'Accept, Authorization, Cookie, X-GitHub-OTP, 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': '2480:222D:2A7410:2CEC77:65509A1A',
      'x-ratelimit-limit': '30',
      'x-ratelimit-remaining': '29',
      'x-ratelimit-reset': '1699781206',
      'x-ratelimit-resource': 'search',
      'x-ratelimit-used': '1',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Validation Failed',
      errors: [Array],
      documentation_url: 'https://docs.github.com/v3/search/'
    }
  },
  request: {
    method: 'GET',
    url: 'https://api.github.com/search/issues?q=in%3Atitle+repo%3ALabiba-AI%2FLabiba.Integration+type%3Aissue+state%3Aopen+The%20automated%20release%20is%20failing%20%F0%9F%9A%A8',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': '@semantic-release/github v9.0.4 octokit-core.js/5.0.0 Node.js/20.8.1 (linux; x64)',
      authorization: 'token [REDACTED]'
    },
    request: { agent: undefined, hook: [Function: bound bound register] }
  },
  pluginName: '@semantic-release/github'
}

please note that the flow is supposed to be for a .net project, not sure if that makes a difference but alas, I've seen #415, I don't think it's relevant to my case.

@travi
Copy link
Member

travi commented Nov 13, 2023

are you granting the necessary permissions to the token in your workflow?

also, this is not the team that supports the action you are using. that adds variables to your setup that complicate our ability to help you. please try to reproduce your issue in a public minimal repo without the use of the action wrapping the official project if you want help directly from us. otherwise, you may be able to get better help from the maintainers of that action instead

@kristof-mattei
Copy link

@travi same issue with semantic-release directly.

The release itself is published correctly (which is proof of correct credentials), yet the success step fails.

@IrisPeres
Copy link

Any news on this issue?

@travi
Copy link
Member

travi commented Feb 23, 2024

The release itself is published correctly (which is proof of correct credentials), yet the success step fails.

different parts of the github api require different permissions. success of one step is not proof of the necessary permissions for other steps. this is a permissions problem. review the github token used and add the missing permissions based on the needs documented in the link provided above

@travi

This comment was marked as off-topic.

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

4 participants