Skip to content

jawdat6/fixgraph-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FixGraph Action

Automatically search FixGraph for verified fixes when your CI build fails. Posts results as a GitHub Step Summary and optional PR comment.

Quick start

- 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 }}

Inputs

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

Outputs

Output Description
fix-found "true" if a fix was found
fix-url URL of the best matching fix

Examples

Node.js / npm

- 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

Python / pytest

- 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 }}

Docker build

- 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)

Use outputs in downstream steps

- 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 }}"

Local testing

INPUT_ERROR="ECONNREFUSED redis 6379" node dist/index.js

License

MIT

About

FixGraph integration for fixgraph-action

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors