Skip to content

Commit 3374ea5

Browse files
jackfirthclaude
andcommitted
Document Resyntax's GitHub integrations
Fixes #448 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ca1f3be commit 3374ea5

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

‎github.scrbl‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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}}.

‎main.scrbl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ To see a list of suggestions that Resyntax would apply, use @exec{resyntax analy
4646

4747

4848
@include-section[(lib "resyntax/cli.scrbl")]
49+
@include-section[(lib "resyntax/github.scrbl")]
4950
@include-section[(lib "resyntax/refactoring-rules.scrbl")]
5051
@include-section[(lib "resyntax/testing.scrbl")]
5152
@include-section[(lib "resyntax/grimoire.scrbl")]

0 commit comments

Comments
 (0)