playfulprogramming / playfulprogramming/hoof
Report rich per-file errors from status checks
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 9
- Forks
- 7
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 23
Description
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
PATCHendpoint, 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the sync jobs, webhook jobs, and existing GitHub check-run PATCH call. Separate the validation and upload error handling into independently testable functions, and verify that caught validation errors produce annotations without failing the job while returning an import status for the webhook jobs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- api, backend, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100