mitchspano / sfdx-scan-pull-request

Runs sfdx-scanner on a pull request and generates in-line comments with the findings.
Apache License 2.0
73 stars 25 forks source link

Report issues with check-runs instead of only comments, and remove comments that are resolved #33

Closed mattisdada closed 1 year ago

mattisdada commented 1 year ago

Unfortunately this became a slightly bigger PR than expected, but this adds two majors pieces of functionality:

Structurally, all of the functionality for generating comments and check-runs have been moved to their own files.

Happy to break up this PR if needed

Check run preview

image

To test, you can use the following action:

    - name: SFDX Scanner
      uses: mattisdada/sfdx-scan-pull-request@main
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        report-mode: check-runs # or swap to `comments` to toggle between them
matthew-gladman-oua commented 1 year ago

There was a big TS conversion this morning, I'll rewrite this in TS along with the other changes, it should be a pretty organic fit

mitchspano commented 1 year ago

Thank you for your contributions @matthew-gladman-oua! Apologies for the TS conversion introducing merge conflicts on this change - James, Jonathan and I were working on that for a long time and wanted to get that in before introducing new changes.

matthew-gladman-oua commented 1 year ago

Thank you for your contributions @matthew-gladman-oua! Apologies for the TS conversion introducing merge conflicts on this change - James, Jonathan and I were working on that for a long time and wanted to get that in before introducing new changes.

All good :) TS conversion will be much better long term, it won't take too long to refactor. I had majority of these changes written 1-2 months ago but lost steam to clean it up so it was merge ready, so mostly my fault 😅

Any feedback on the conceptual changes (ie, using check-runs, making it the default, deleting comments, etc) would be great

mattisdada commented 1 year ago

Started the port, mostly done, but not fully tested yet:

I did notice the number of lines scanned were way bigger than it used to be, not sure if that's an issue in the TS conversion or my branch 🤔 But my changes shouldn't have affected the lines scanned, so, not sure

mattisdada commented 1 year ago

Replaced with new PR #40