OpenAPITools / OpenAPITools/openapi-generator-pip

Configure CI for PR from forked repo

Open
#56 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
31
Forks
8
Avg merge
5h 51m
Merged PRs (30d)
3

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failed GitHub Actions run linked in the issue and inspect the workflow used by PR #55. Check the fork-PR event and permission settings against the documented pull_request_target approach, then verify that the workflow can comment on fork PRs without executing untrusted fork code with elevated permissions.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.