Skip to content

Configure CI for PR from forked repo #56

@eggplants

Description

@eggplants

Ref: #55

https://github.com/OpenAPITools/openapi-generator-pip/actions/runs/25132610526/job/73662970317?pr=55#step:7:48

This PR is from a fork. GitHub restricts the GITHUB_TOKEN to read-only
for fork PRs triggered by the pull_request event.

To fix this, use the pull_request_target event instead:

on:
  pull_request_target:
    types: [opened, synchronize, reopened]

permissions:
  contents: read
  pull-requests: write

Note: pull_request_target runs in the context of the base branch.
Be cautious when checking out fork code — never run untrusted code
from the fork with elevated permissions.

For more information, see:
https://github.com/MishaKav/pytest-coverage-comment#fork-prs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions