feat: parse deploy errors into PR report - #4
Merged
Merged
Conversation
A failed deploy used to skip the tests and the PR comment then said "All Tests Passed / No test results found". Deploy now runs with --json, scripts/deploy-report.js turns component failures into a Markdown table with hints and file annotations, and the PR comment shows deployment status before test results. Scripts are checked out from this repo at github.job_workflow_sha so template branches can be tested from any project.
github.job_workflow_sha is empty inside a reusable workflow, so the scripts checkout fell back to main.
Show the root compile error as the only table row and list the classes that fail just because they depend on it in a collapsed section. Adds a hint for global methods with non-global types.
This was referenced Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When
sf project deploy startfailed, the tests step was skipped and the PR comment still said "All Tests Passed / No test results found" (see beyond-the-cloud-dev/trigger-lib#7). The actual component errors were only visible deep in the job log.What
--jsonandcontinue-on-error, output saved totests/apex/deploy-result.json.scripts/deploy-report.jsparses it: component failures grouped per component and problem, "Dependent class is invalid" cascades collapsed under the root error, hints matched fromscripts/deploy-tips.js,::error file=...,line=...annotations on the failing files, job summary, and step outputs (status,error_count, ...).scripts/pr-comment.jsbuilds the single🚀 Salesforce CIPR comment (deployment status first, then test summary). Replaces the inline JS that was duplicated in both workflows. It still updates the old🧪 Apex Test Resultscomment if one exists.template-refinput (defaultmain).github.job_workflow_shais empty in reusable workflows, so an input is the only way to test a template branch end to end.salesforce-ci.ymlandsalesforce-ci-with-build.yml. README documents the scripts and the input.Tested on
QueueableBuilderalone, 15 dependents folded) was verified locally against that run'sdeploy-result.json. A live rerun could not start because the org hit its Actions spending limit for private repos.Those three PRs are throwaway and are closed. Every repo uses
@main, so merging this rolls it out everywhere; no change needed in the callers.