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

Closed
opened 2026-04-20 23:33:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6420
Author: @MatissJanis
Created: 12/15/2025
Status: Merged
Merged: 12/15/2025
Merged by: @MatissJanis

Base: masterHead: matiss/fix-vrt-comment-fork-prs


📝 Commits (3)

  • 489d18b Fix VRT comment posting for fork PRs
  • b2422ca Update permissions in e2e-vrt-comment workflow to allow read access for actions
  • 93e35d2 Enhance VRT comment posting in workflow by using environment variables for PR number and artifact URL

📊 Changes

4 files changed (+89 additions, -11 deletions)

View changed files

📝 .github/workflows/e2e-test.yml (+13 -10)
.github/workflows/e2e-vrt-comment.yml (+69 -0)
📝 .github/workflows/vrt-update-generate.yml (+1 -1)
upcoming-release-notes/6420.md (+6 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/6420 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 12/15/2025 **Status:** ✅ Merged **Merged:** 12/15/2025 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/fix-vrt-comment-fork-prs` --- ### 📝 Commits (3) - [`489d18b`](https://github.com/actualbudget/actual/commit/489d18bb38fc9a93b091c0b2061b45d2fcf40d51) Fix VRT comment posting for fork PRs - [`b2422ca`](https://github.com/actualbudget/actual/commit/b2422cad8732be3e0a748355e29b2f8a29db2364) Update permissions in e2e-vrt-comment workflow to allow read access for actions - [`93e35d2`](https://github.com/actualbudget/actual/commit/93e35d2b7126015779e30d0fa11de993063f7ee1) Enhance VRT comment posting in workflow by using environment variables for PR number and artifact URL ### 📊 Changes **4 files changed** (+89 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/e2e-test.yml` (+13 -10) ➕ `.github/workflows/e2e-vrt-comment.yml` (+69 -0) 📝 `.github/workflows/vrt-update-generate.yml` (+1 -1) ➕ `upcoming-release-notes/6420.md` (+6 -0) </details> ### 📄 Description ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 23:33:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#36706