[PR #6420] Fix VRT comment posting for fork PRs #6511

Closed
opened 2026-02-28 21:29:22 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6420

State: closed
Merged: Yes


Summary

This PR fixes the issue where VRT failure comments were not being posted on PRs from fork repositories.

Problem

The current implementation in e2e-test.yml tries to post comments directly using actions/github-script, but this fails for fork PRs because the GITHUB_TOKEN has read-only permissions for security reasons.

Solution

Use a workflow_run triggered workflow that runs with elevated permissions in the base repository context:

  1. Modified e2e-test.yml: Instead of posting comments directly, the workflow now uploads PR metadata (PR number, VRT result, artifact URL) as an artifact.

  2. New e2e-vrt-comment.yml: A new workflow that:

    • Triggers on workflow_run completion of "E2E Tests"
    • Has pull-requests: write permission
    • Downloads the metadata artifact
    • Posts a comment with the VRT report link if tests failed

This follows the same pattern already used in vrt-update-apply.yml for handling fork PRs safely.

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6420 **State:** closed **Merged:** Yes --- ## Summary This PR fixes the issue where VRT failure comments were not being posted on PRs from fork repositories. ## Problem The current implementation in `e2e-test.yml` tries to post comments directly using `actions/github-script`, but this fails for fork PRs because the `GITHUB_TOKEN` has read-only permissions for security reasons. ## Solution Use a `workflow_run` triggered workflow that runs with elevated permissions in the base repository context: 1. **Modified `e2e-test.yml`**: Instead of posting comments directly, the workflow now uploads PR metadata (PR number, VRT result, artifact URL) as an artifact. 2. **New `e2e-vrt-comment.yml`**: A new workflow that: - Triggers on `workflow_run` completion of "E2E Tests" - Has `pull-requests: write` permission - Downloads the metadata artifact - Posts a comment with the VRT report link if tests failed This follows the same pattern already used in `vrt-update-apply.yml` for handling fork PRs safely.
GiteaMirror added the pull-request label 2026-02-28 21:29:22 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#6511