Skip to content

chore(auto-approve): make review body self-explanatory#105

Open
Piotr1215 wants to merge 1 commit intomainfrom
devops-714/review-body-useful
Open

chore(auto-approve): make review body self-explanatory#105
Piotr1215 wants to merge 1 commit intomainfrom
devops-714/review-body-useful

Conversation

@Piotr1215
Copy link
Copy Markdown
Contributor

Summary

Replace the review body that auto-approve-bot-prs leaves on approved PRs with something actually useful to someone auditing an approval.

Before:

Auto-approved: trusted bot, CI green, no merge conflicts.

After:

Approved by the shared auto-approve workflow because this PR matched the approval criteria.

For more information, see https://github.com/loft-sh/github-actions?tab=readme-ov-file#auto-approve-bot-prs.

Why

The old message just restated the approval status (already shown by GitHub's UI) and gave no pointer to the source of the rules. Because this action runs against PRs in every repo that wires up the reusable workflow (vcluster-docs, vcluster, vcluster-pro, loft-enterprise, hosted-platform, loft-prod, ...), the body needs to stand on its own and point somewhere that anyone can audit without repo-specific knowledge. Linking directly to the README section gives exactly that.

The value is a YAML block scalar with a paragraph break so GitHub's markdown renders the URL on its own line rather than collapsing the whole message into a single run-on sentence.

References

DEVOPS-714 (review-body cleanup surfaced during the auto-approve rollout)

Test plan

  • Verified YAML parses to the expected two-paragraph string (manual yaml.safe_load).
  • No other changes to the composite action, so existing bats suites and PR smoke-tests are unaffected.
  • After merge, pick any trusted-author PR and confirm the new body renders with a proper paragraph break and a clickable link to the README anchor.

the previous review body ("Auto-approved: trusted bot, CI green, no
merge conflicts.") restates what the approval UI already shows and
leaves a reader who lands on a random bot-approved PR with no path
to audit the rules that let the approval through.

this message shows up on PRs across every repo that calls the
shared workflow (vcluster-docs, vcluster, vcluster-pro,
loft-enterprise, hosted-platform, loft-prod...), so it needs to
work without any repo-specific context. linking to the README
section gives anyone reading the approval a one-click jump to the
eligibility criteria and source, regardless of which repo surfaced
the PR. the body scalar uses a YAML block with a paragraph break so
GitHub renders the link on its own line rather than collapsing the
whole thing into a run-on sentence.
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.

1 participant