Skip to content

Add fix guidelines and examples for failed checks to the run summary #29

Description

@oto-macenauer-absa

Summary

When a check fails, the workflow run summary ($GITHUB_STEP_SUMMARY) shows the failed check and a detail message, but gives the PR author no guidance on how to fix the failure. Add a short guidelines section plus concrete examples to the summary so contributors can self-serve a fix without digging into the action source or docs.

Current behavior

check.sh renders a results table and a **Result:** X/Y checks passed line. On failure there is no remediation hint — just the status and a raw detail message.

## PR Requirements Check

| Check | Status | Details |
|-------|--------|---------|
| Title prefix | ❌ Fail | `...` |

**Result:** 1/2 checks passed

Proposed change

When FAIL_COUNT > 0, append a "How to fix" section to the step summary, e.g.:

  • A short intro line explaining the checks are required to merge.
  • Per failed check, a one-line remediation tip (what to change and where).
  • One or two worked examples (e.g. correct title prefix, required label, linked issue).
  • Optional: link to the repo's contributing / PR guidelines.

Example

### How to fix

The checks above must pass before this PR can merge.

- **Title prefix** — start the PR title with an allowed prefix.
  -`feat: add retry logic`
  -`added retry logic`
- **Linked issue** — reference an issue in the description, e.g. `Closes #123`.

See the contributing guidelines for details.

Notes

  • Only render the guidance block on failure to keep passing summaries clean.
  • Keep PR-controlled text inert (same escaping already applied to detail messages in check.sh).
  • Guidance text should ideally be configurable / map to each check so it stays accurate as rules change.

Acceptance criteria

  • Failed run summary includes a "How to fix" section with per-check remediation tips.
  • At least one concrete example is shown.
  • Passing runs are unchanged.
  • Tests cover the new summary output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions