Skip to content

GitHub Workflow Error: "Resource not accessible by integration" in Flutter Test Workflow #121

@behzodfaiziev

Description

@behzodfaiziev

The Flutter Test workflow fails to post a comment on successful test completion due to a permissions issue with the GitHub Script action. Specifically, it throws the following error:

Error: Unhandled error: HttpError: Resource not accessible by integration

The error occurs in the Check Test Results step, which attempts to create a comment on the pull request once tests pass. This issue may be related to permission settings or token access limitations for the GitHub Script.

Here is the relevant section of the workflow:

- name: Check Test Results
  if: success()
  uses: actions/github-script@v6
  with:
    script: |
      github.rest.issues.createComment({
        issue_number: context.payload.pull_request.number,
        owner: context.repo.owner,
        repo: context.repo.repo,
        body: 'All tests passed! 🎉'
      })

This error has also occurred in the following pull requests: #114 #120

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions