|
| 1 | +#lang scribble/manual |
| 2 | + |
| 3 | + |
| 4 | +@title[#:tag "github"]{Resyntax on GitHub} |
| 5 | + |
| 6 | + |
| 7 | +Resyntax integrates with GitHub in two ways. The @emph{analyzer} reviews pull requests, leaving |
| 8 | +Resyntax's suggestions as review comments on the lines they apply to. The @emph{autofixer} |
| 9 | +periodically runs over an entire repository and opens a pull request applying the fixes it finds, |
| 10 | +cleaning the repository up over time. Both are GitHub Actions workflows built on the |
| 11 | +@exec{resyntax analyze} and @exec{resyntax fix} commands described in @secref["cli"]. |
| 12 | + |
| 13 | +Reviews the analyzer has left on pull requests in the wild can be found with |
| 14 | +@hyperlink["https://github.com/search?q=%22Resyntax%20analyzed%22%20%22added%20suggestions%22%20in%3Acomments%20is%3Apr%20sort%3Aupdated%20&type=pullrequests"]{ |
| 15 | + this GitHub search}, and pull requests opened by the autofixer can be found with |
| 16 | +@hyperlink["https://github.com/search?q=author%3Aapp%2Fresyntax-ci&type=pullrequests"]{this one}. |
| 17 | + |
| 18 | +The analyzer is split into two workflows: one that analyzes the code and uploads the analysis as an |
| 19 | +artifact, and one that downloads the artifact and submits it as a pull request review. The analyzing |
| 20 | +workflow checks out and compiles the pull request's branch, so it runs with read-only repository |
| 21 | +permissions; the submitting workflow needs write permissions but never executes any of the |
| 22 | +repository's code. This division lets pull requests from forks be analyzed safely. Resyntax's own |
| 23 | +repository uses this setup, in |
| 24 | +@hyperlink["https://github.com/jackfirth/resyntax/blob/master/.github/workflows/resyntax-analyze.yml"]{ |
| 25 | + @tt{resyntax-analyze.yml}} and |
| 26 | +@hyperlink["https://github.com/jackfirth/resyntax/blob/master/.github/workflows/resyntax-submit-review.yml"]{ |
| 27 | + @tt{resyntax-submit-review.yml}}. |
0 commit comments