gemfarmer / content-linter

A houndci-like tool to keep your content consistent
1 stars 0 forks source link

Use retext to process files #4

Closed gemfarmer closed 7 years ago

gemfarmer commented 7 years ago

Related to #2

This PR is an attempt to transition away from the FileContents service toward a tried and true language processor and set of plugins, retext

Specifically, this adds a new service, RemarkProcessor, that runs a node script that processes a file's text.

Fortunately, because retext is an expansive processing tool and gives response data that works well with Github's create_pull_request_comment method, we should be able to fully replace all the content linting architecture that was in place.

The new app structure will look as follows:

  1. @payload
  2. find changed files (PullRequestFiles and GithubFileContents)
  3. RemarkProcessor
  4. Octokit.create_pull_request_comment

@monfresh

gemfarmer commented 7 years ago

Runs fine locally!