From 5ed6f3eadd27b12d83e5bb1e2fe776d93f3289d9 Mon Sep 17 00:00:00 2001 From: Brandon Page Date: Sun, 3 Nov 2024 23:15:49 -0800 Subject: [PATCH] no message --- .github/DangerFiles/StaticAnalysis.rb | 6 ++++-- .github/workflows/reusable-workflow.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/DangerFiles/StaticAnalysis.rb b/.github/DangerFiles/StaticAnalysis.rb index 99ee013a91..c8247315b4 100644 --- a/.github/DangerFiles/StaticAnalysis.rb +++ b/.github/DangerFiles/StaticAnalysis.rb @@ -25,11 +25,13 @@ print "file name: #{report_file_name}\n" if modified_file_names.include?(report_file_name) || added_file_names.include?(report_file_name) - print "file match! #{file}" + print "file match! #{file}\n" issues = report['diagnostics'] + print "issue count: #{issues.count}\n" for i in 0..issues.count-1 unless issues[i].nil? - message << "#{file_path.split('/').last} | #{issues[i]['type']} | #{issues[i]['category']} | #{issues[i]['description']} | #{issues[i]['location']['line']} | #{issues[i]['location']['col']}\n" + print "#{file_path.split('/').last} | #{issues[i]['type']} | #{issues[i]['category']} | #{issues[i]['description']} | #{issues[i]['location']['line']} | #{issues[i]['location']['col']}\n" + # message << "#{file_path.split('/').last} | #{issues[i]['type']} | #{issues[i]['category']} | #{issues[i]['description']} | #{issues[i]['location']['line']} | #{issues[i]['location']['col']}\n" end end end diff --git a/.github/workflows/reusable-workflow.yaml b/.github/workflows/reusable-workflow.yaml index 2d2e34fe8e..992de68b56 100644 --- a/.github/workflows/reusable-workflow.yaml +++ b/.github/workflows/reusable-workflow.yaml @@ -36,7 +36,7 @@ jobs: code-coverage: ${{ github.event_name == 'pull_request' }} upload-logs: always - name: Danger Test Results - if: failure() + if: (github.event_name == 'pull_request') && failure() env: DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: |