A GitHub action for automatically evaluating the logic level impacts of Pull Requests.
With a simple setup in your GitHub Action:
- name: diffctx
uses: williamfzc/diffctx@v0.3.13
with:
lang: "golang"
Diffctx will automatically analyse the diff (and the context of diff) every new PullRequests in your repo, and leave comments for indicating which part you should care most:
Based on LSIF, diffctx will not only analyse the lines contained by the diff, but also the full scope of your repo, and understand it well.
diffctx can be directly used with GitHub Action.
name: Test PR
# triggered by pull_request
on: [ push, pull_request ]
# for creating comments
permissions:
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# at least
fetch-depth: 2
# ...
- name: diffctx
uses: williamfzc/diffctx@v0.3.13
with:
# see the `Supported Langs` for details
lang: "golang"
You can create a new PullRequest for test.
Or test it with a push. You can find it in actions log.
Language | Ready? | Keyword in yaml | Real-world Sample |
---|---|---|---|
Golang | ✅ | golang |
ci.yml |
Java | ✅ | java |
main.yml |
Kotlin | ✅🚧 | kotlin |
build.yml |
NodeJs | ✅ | node |
build.yml |
Python | ✅ | python |
run-test.yml |
Thanks to tree-sitter and LSIF, diffctx can support nearly all the popular languages.
Adding a new language support is not hard. PullRequests are always welcome!
- Scan the repo and understand it well
- Extract the sub graph influenced by the diff
- Generate a summary from sub graph
- Create a comment
Issues, PRs and suggestions are always welcome.
- More languages
- Better comment format
- Extract more meaningful columns (like function definition) from code
- Display graph in comment also