diff --git a/.github/scripts/comment.js b/.github/scripts/comment.js index 1bc8ea035c..82ccd32423 100644 --- a/.github/scripts/comment.js +++ b/.github/scripts/comment.js @@ -5,7 +5,7 @@ module.exports = async ({ github, context, header, body }) => { const { data: comments } = await github.rest.issues.listComments({ owner: context.repo.owner, repo: context.repo.repo, - issue_number: context.payload.number, + issue_number: context.issue.number, }); const botComment = comments.find( diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 997b794b8b..3f4d7ae245 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -16,21 +16,25 @@ jobs: id: slither with: fail-on: none - continue-on-error: true sarif: results.sarif slither-config: ethereum-bridge-contracts/slither.config.json target: ethereum-bridge-contracts slither-args: --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/ - - name: ls - run: ls + - name: Push SARIF to DefectDojo + # TODO: push to DefectDojo +# run: ls results.sarif + run: echo ${{ github.event.number }} - name: Create/update checklist as PR comment uses: actions/github-script@v6 if: github.event_name == 'push' + env: + REPORT: ${{ steps.slither.outputs.stdout }} with: script: | const script = require('.github/scripts/comment') const header = '# Slither report' -# const body = `${{ steps.slither.outputs.stdout }}` -# await script({ github, context, header, body }) + const { REPORT } = process.env + const { PR_NUMBER } = process.env + await script({ github, context, header, body: REPORT })