Automatically search FixGraph for verified fixes when your CI build fails. Posts results as a GitHub Step Summary and optional PR comment.
- name: Search FixGraph for fixes
if: failure()
uses: jawdat6/fixgraph-action@v1
with:
error: "paste your error here or capture from previous step"
github-token: ${{ secrets.GITHUB_TOKEN }}| Input | Required | Default | Description |
|---|---|---|---|
error |
No | — | Error text or build logs to search |
github-token |
No | ${{ github.token }} |
Token for posting PR comments |
fixgraph-key |
No | — | FixGraph API key (get free at fixgraph.netlify.app) |
max-results |
No | 3 |
Max issues to surface |
| Output | Description |
|---|---|
fix-found |
"true" if a fix was found |
fix-url |
URL of the best matching fix |
- name: Run tests
id: tests
run: npm test 2>&1 | tee test.log; exit ${PIPESTATUS[0]}
continue-on-error: true
- uses: jawdat6/fixgraph-action@v1
if: steps.tests.outcome == 'failure'
with:
error: $(tail -50 test.log)
github-token: ${{ secrets.GITHUB_TOKEN }}
- if: steps.tests.outcome == 'failure'
run: exit 1- name: pytest
id: pytest
run: pytest --tb=short 2>&1 | tee pytest.log; exit ${PIPESTATUS[0]}
continue-on-error: true
- uses: jawdat6/fixgraph-action@v1
if: steps.pytest.outcome == 'failure'
with:
error: $(tail -40 pytest.log)
github-token: ${{ secrets.GITHUB_TOKEN }}- name: Build
id: build
run: docker build . 2>&1 | tee build.log; exit ${PIPESTATUS[0]}
continue-on-error: true
- uses: jawdat6/fixgraph-action@v1
if: steps.build.outcome == 'failure'
with:
error: $(tail -50 build.log)- uses: jawdat6/fixgraph-action@v1
id: fixgraph
if: failure()
with:
error: "ECONNREFUSED 127.0.0.1:5432"
- if: steps.fixgraph.outputs.fix-found == 'true'
run: echo "Fix → ${{ steps.fixgraph.outputs.fix-url }}"INPUT_ERROR="ECONNREFUSED redis 6379" node dist/index.jsMIT