Skip to content

Copilot code review action failing with HTTP 403 insufficient permissions for artifact cleanup #1674

@Manar-Elhabbal7

Description

@Manar-Elhabbal7

Describe the bug/problem

The Copilot code review GitHub Actions workflow is failing consistently across multiple pull requests with an HTTP 403 permission error during artifact cleanup. The workflow exits with exit code 1 despite completing the review process.

Steps to Reproduce the bug/problem

  1. Open any recent pull request in the foss42/apidash repository
  2. Navigate to the "Actions" tab
  3. Locate the "Copilot code review" workflow run
  4. Click on the workflow run to view details
  5. Scroll to the bottom of the job logs
  6. Observe the error: gh: Resource not accessible by integration (HTTP 403)

Expected behavior

The Copilot code review workflow should complete successfully without HTTP 403 permission errors. The job should exit with code 0 (success) after completing the code review and cleaning up artifacts.

Proposed Solution

Add explicit permissions to the workflow configuration:

permissions:
  actions: write
  contents: read
  pull-requests: write

Or alternatively, disable artifact cleanup if not needed.

Device Info (The device where you encountered this issue)
OS: Linux

This is a CI/CD infrastructure issue, not device-specific

Flutter Doctor
N/A (This is a GitHub Actions workflow issue, not a Flutter/development environment issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions