refactor(opentofu): in-progress PR comment updates, unified headers, collapsible output - #34
Merged
Merged
Conversation
…ent headers Post an in-progress update to the pinned test/plan PR comments before each job runs, preserving the previous run's output in a collapsible section. Unify both comments on the plan-style header (#### OpenTofu Test/Plan with a passed/failed status line), drop the "Validation output (redacted, last 12000 characters)" line, and wrap the output body in a collapsible "View run output" section.
Write the escape as the six-character sequence � instead of a raw ESC control byte, which is not a valid YAML character.
Shared workflows CI passedValidation output (redacted, last 12000 characters) |
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.
Summary
Refactors the pinned PR comment behavior in
opentofu.yml(bothtestandplanjobs):#### OpenTofu Test/OpenTofu test passed./OpenTofu test failed.#### OpenTofu Plan/OpenTofu plan passed./OpenTofu plan failed with exit code X.Validation output (redacted, last 12000 characters)line from the test comment (redaction itself is unchanged).<details>block with summary "View run output". Both comments keep/gain a "View the workflow run" link.Caller impact
No interface change: inputs, secrets, permissions, runner labels, triggers, emitted checks, and artifacts are unchanged. Callers (
tfroot-aws,tfroot-gcp,tfroot-libvirt,tfroot-github,tfroot-cloudflare, and any other@mainconsumers) pick this up on their next run without modification. Fork-PR behavior is unchanged (no comment steps run; the test in-progress step uses the same same-repository condition as the existing report step). Theapplyjob is untouched.Notes
actions/github-script@3a2844b... # v9.0.0and existingpull-requests: writejob permissions.main(/\u001b\[[0-?]*[ -/]*[@-~]/g).Validation
_ci.yml: pre-commit/actionlint/gitleaks) on this PR.