Skip to content

Fix prettier workflow for fork-based PRs#89

Merged
tobiaslins merged 1 commit intoinvoiceradar:mainfrom
rudivice:fix/checkout-fork-prs
Mar 5, 2026
Merged

Fix prettier workflow for fork-based PRs#89
tobiaslins merged 1 commit intoinvoiceradar:mainfrom
rudivice:fix/checkout-fork-prs

Conversation

@rudivice
Copy link
Copy Markdown
Contributor

@rudivice rudivice commented Mar 5, 2026

Problem

The prettier workflow fails when a PR is opened from a fork. The actions/checkout step tries to fetch the branch from the base repository (invoiceradar/plugins), but the branch only exists on the contributor's fork.

Fix

  • Add repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} so checkout fetches from the correct repository (the fork for PRs, the base repo for direct pushes to main)
  • Upgrade actions/checkout from v3 to v4

Use the head repo full name so the checkout step fetches the branch
from the contributor's fork instead of the base repository.
Also upgrades actions/checkout from v3 to v4.
@tobiaslins tobiaslins merged commit 327d44a into invoiceradar:main Mar 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants