Skip to content

Report rich per-file errors from status checks #230

Description

@fennifith

This issue is for enhancing the pull request check reporting in #229.

When a specific markdown validation error, frontmatter parsing, or file import fails within a sync job, an explanation should be sent back to github using the annotations array in the PATCH endpoint for the check run.

This could contain information like "frontmatter syntax is not valid" or "publishedAt does not match the expected format MM-DD-YYYY"

  • Errors parsing frontmatter for a collection, post, or author
  • Errors processing or uploading an image/attachment

This will expand the amount of logic in the sync jobs. To avoid cluttering up the codebase, affected logic should be split out into separate files/functions, and unit tested independently from the main job processor(s).

Note - if a validation error is successfully caught and reported using the PATCH endpoint, the job should not fail, as reporting the issue to the user is the expected behavior (i.e. the job did what it was supposed to!). The job should instead return a status indicating whether it imported the post, which the webhook jobs can use to mark the run as a success or failure once all other jobs are complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions