8398a7 / action-slack

Provides the function of slack notification to GitHub Actions.
https://action-slack.netlify.app/
MIT License
588 stars 133 forks source link

Error: Resource not accessible by integration #239

Open kdemon1011 opened 1 year ago

kdemon1011 commented 1 year ago

Hi I am using V3.15.1 and getting the following error. We have the GitHub Enterprise version. Error: Resource not accessible by integration

and this is the configuration

 - uses: 8398a7/action-slack@v3.15.1
        with:
          github_base_url: https://github.com/data-sentinel-ai
          status: ${{ job.status }}
          fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
        if: always() # Pick up events even if the job fails or is canceled.

Can you help us to resolve the issue? Thanks

vijaybaliah commented 1 year ago

Hi I am using V3.15.1 and getting the following error. We have the GitHub Enterprise version. Error: Resource not accessible by integration

and this is the configuration

 - uses: 8398a7/action-slack@v3.15.1
        with:
          github_base_url: https://github.com/data-sentinel-ai
          status: ${{ job.status }}
          fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
        if: always() # Pick up events even if the job fails or is canceled.

Can you help us to resolve the issue? Thanks

got this same error when using GitHub Enterprise version

bemaverick commented 11 months ago

any solution for this?

maersu commented 11 months ago

Got it working for our enterprise with permissions in jobs and github_base_url in with (see README on the buttom)

jobs:
  first-job:
    name: First Job
    runs-on: ubuntu-latest
    permissions:
      contents: read
      actions: read
    steps:
      - uses: actions/checkout@v3
      - uses: 8398a7/action-slack@v3
        with:
          github_base_url: https://github.com/enterprises/gobugfree
          status: custom
          fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
          custom_payload: |
          .........
saintevil commented 7 months ago

To fix and resolve:

Go to the effected GitHub repository to where the error is happening Select Settings -> Actions -> General Change to read and write permissions

https://thomasthornton.cloud/2024/01/31/github-action-error-resource-not-accessible-by-integration-when-attempting-to-upload-sarif-report-files-to-github/