Skip to content

Commit fa598b6

Browse files
jackfirthsamth
authored andcommitted
Analyze pull requests with Resyntax
Analyze pull requests with Resyntax @samth expressed interest in setting up [Resyntax](https://docs.racket-lang.org/resyntax/) in the Typed Racket repository. This CL adds a github workflow which runs Resyntax on any changed files in a pull request. Resyntax will suggest changes in the form of a github review, [like this](jackfirth/racket-package-resyntax-action#9 (review)). To apply the changes, the pull request author simply need click the "Commit suggestion" button that shows up in each comment. Suggestions can also be ignored freely; the review does not block merges. The tool and the github integration are both still in the early phases so there are probably several bugs to work out here. If a suggestion looks wonky, @-mention me and I'll take a look at it.
1 parent 5c293e3 commit fa598b6

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/resyntax.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Resyntax
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- reopened
9+
- synchronize
10+
- ready_for_review
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
# See https://github.com/actions/checkout/issues/118.
21+
with:
22+
fetch-depth: 0
23+
- uses: Bogdanp/[email protected]
24+
with:
25+
version: current
26+
packages: resyntax
27+
local_catalogs: $GITHUB_WORKSPACE
28+
dest: '"${HOME}/racketdist-current-CS"'
29+
sudo: never
30+
- name: Register local packages
31+
run: |
32+
raco pkg install -i --auto --no-setup --skip-installed typed-racket-test
33+
raco pkg update --auto --no-setup source-syntax typed-racket-lib typed-racket-more typed-racket-compatibility typed-racket-doc typed-racket typed-racket-test
34+
- run: raco setup typed typed-racket typed-racket-test typed-scheme
35+
- run: xvfb-run racket -l- resyntax/cli analyze --local-git-repository . "origin/${GITHUB_BASE_REF}" --output-as-github-review

0 commit comments

Comments
 (0)