Skip to content

[Bug]: CI: Failed to add/update comment to PR: HttpError: Resource not accessible by integration #1421

@wood3n

Description

@wood3n

Version

web-infra-dev/rsdoctor-action@main

In github actions

Details

May I ask if special permissions are required when executing in github actions? I have already given workflow write permission, but someone forked my repository and can't create comment after submitting the PR.

Image Image

Reproduce link

https://github.com/wood3n/biu/actions/runs/19785429009/job/56691207813

Reproduce Steps

This is my action's configuration

name: Web Analysis

on:
  pull_request:
    types: [opened, synchronize, reopened, closed]

permissions:
  contents: write
  issues: write
  pull-requests: write

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  changes:
    name: Detect Core Changes
    runs-on: ubuntu-latest
    outputs:
      core: ${{ steps.filter.outputs.core }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Paths Filter
        id: filter
        uses: dorny/paths-filter@v3
        with:
          filters: |
            core:
              - 'src/**'
              - 'rsbuild.config.ts'
              - 'package.json'
              - 'pnpm-lock.yaml'
              - '.nvmrc'
              - 'tsconfig.json'

  build:
    needs: changes
    if: ${{ needs.changes.outputs.core == 'true' }}
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Setup Pnpm
        uses: pnpm/action-setup@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version-file: ".nvmrc"
          cache: "pnpm"

      - name: Configure Git to use HTTPS instead of SSH
        run: git config --global url."https://github.com/".insteadOf "git@github.com:"

      - name: Install Dependencies
        run: pnpm install --frozen-lockfile
        env:
          HUSKY: 0

      - name: Build Web Resources
        run: pnpm build:web

      - name: Bundle Analysis
        uses: web-infra-dev/rsdoctor-action@main
        with:
          file_path: "dist/web/rsdoctor-data.json"
          target_branch: "master"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions