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

Resource not accessible by integration for the default token, the action is green nevertheless #1350

Open
oleg-nenashev opened this issue Jul 19, 2023 · 5 comments

Comments

@oleg-nenashev
Copy link
Contributor

I hit a weird behavior in https://github.com/wiremock/wiremock-testcontainers-go that has lasted since a few days ago

Any ideas about what's wrong with this repo would be appreciated. I also suggest failing the action by default in the case of such errors.

Action view

image

Execution log

image

@jetersen
Copy link
Member

jetersen commented Jul 20, 2023

I believe you need to add the permission block to the steps section on any new workflows which is due to GitHub recent increased security to GitHub Actions.

    permissions:
      # write permission is required to create a github release
      contents: write
      # write permission is required for autolabeler
      # otherwise, read permission is required at least
      pull-requests: write

@oleg-nenashev
Copy link
Contributor Author

I believe you need to add the permission block to the steps section on any new workflows which is due to GitHub recent increased security to GitHub Actions.

The thing is that it was an old workflow that actually worked before... and works now. So ther ewas a temporary glitch somewhere.

@jetersen what do you think about failing the action by default if a request fails?

@oleg-nenashev
Copy link
Contributor Author

Nevertheless, I confirm it fixes the issue itself

@arnaugm
Copy link

arnaugm commented Nov 22, 2023

I have a similar issue when not providing the token, the action is green but when you inspect the RD step then you see the error there, would help if these errors fail the action.

@aobort
Copy link

aobort commented Apr 9, 2024

Hi,
The same issue appeared when I create PRs from fork to upstream repo. When pushing to a feature branch in target repo and create PR from it, then all good. The workflow file is like this:

name: Release Drafter

on:
  workflow_dispatch:
  pull_request:
  push:
    branches:
      - main

permissions:
  contents: write
  pull-requests: write

jobs:
  update_release_draft:
    runs-on: ubuntu-latest
    steps:
      - uses: release-drafter/release-drafter@v6
        with:
          disable-releaser: github.ref != 'refs/heads/main'
          config-name: release-drafter.yml
          commitish: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

which results to green check, but errors inside:

Error: Resource not accessible by integration
{
  name: 'HttpError',
  id: '8621[25](https://github.com/***/actions/runs/8621254699/job/23629713494?pr=127#step:2:26)4699',
  status: 403,
  response: {
    url: 'https://api.github.com/repos/***/issues/1[27](https://github.com/***/actions/runs/8621254699/job/23629713494?pr=127#step:2:28)/labels',
    status: 403,

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