Skip to content

Commit

Permalink
feat: Comment after running script
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Apr 29, 2024
1 parent 16c89ef commit d25cfaf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/periphery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Periphery
id: periphery
run: ./scripts/periphery.sh
- uses: mshick/add-pr-comment@v2
with:
message: |
Found ${{ steps.periphery.outputs.unused_count }} unused code occurences
<details>
<summary>Expand</summary>
${{ steps.periphery.outputs.detailed_output }}
</details>
3 changes: 3 additions & 0 deletions scripts/periphery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ unusedCount=$(wc -l <<< "$detailedOutput" | tr -d '[:space:]')

echo "$detailedOutput"
echo "Total unused instances $unusedCount"

echo "detailed_output=test" >> $GITHUB_OUTPUT
echo "unused_count=$unusedCount" >> $GITHUB_OUTPUT

0 comments on commit d25cfaf

Please sign in to comment.