Skip to content

Error posting PR comment: Resource not accessible by integration: 403 #143

Description

@csidirop

describe your issue

While trying the commit-check action with the experimental pr-comments option I ran into an issue.

When using more or less the config example from the marketplace the workflow aborted. These are the lines from the log:

2025-09-11T13:53:02.4577894Z Request GET /repos/csidirop/actiontest/issues/1 failed with 403: Forbidden
2025-09-11T13:53:02.4580746Z Error posting PR comment: Resource not accessible by integration: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/issues/issues#get-an-issue", "status": "403"}

Adding issues: write to the permissions fixes the issue. (See my commit-check.yml). I read that PR are treated like issues, but I don't know why pull-requests: write did not work. Maybe you can do something with that issue and info.

commit-check version

v1 ?

.commit-check.yml

name: Commit Check
on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  check:
    runs-on: ubuntu-latest
    permissions: # use permissions because use of pr-comments
        contents: read
        issues: write
        pull-requests: write
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 0 # required for merge-base check
      - uses: commit-check/commit-check-action@v1 # see https://github.com/marketplace/actions/commit-check-action
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with: # enable only what you need
          author-name: true
          author-email: true
          branch: false
          commit-signoff: false
          imperative: false
          job-summary: true
          message: false
          merge-base: false
          pr-comments: ${{ github.event_name == 'pull_request' }}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions