feat: add author name to skipped packages in Discord notifications

API Changes:
- Track author name along with package name and reason
- Extract author from pkg.author (string or object with name field)
- Default to "unknown" if author info not available

Workflow Changes:
- Display author in format: "package-name (by author) - reason"

Example Discord output:
📋 Skipped Packages
tpmjs-threejs-tool (by john-doe) - invalid tpmjs field
@scope/package-1 (by jane-smith) - missing tpmjs field

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-12-03 09:18:16 +10:00
parent 14cd668a2b
commit fcd6667357
2 changed files with 25 additions and 5 deletions

View file

@ -59,7 +59,7 @@ jobs:
# Store skipped packages for Discord
if [ "$skipped" -gt 0 ]; then
skippedList=$(echo "$response" | jq -r '.data.skippedPackages[]? | "\(.name) - \(.reason)"' 2>/dev/null | paste -sd "\n" - || echo "")
skippedList=$(echo "$response" | jq -r '.data.skippedPackages[]? | "\(.name) (by \(.author)) - \(.reason)"' 2>/dev/null | paste -sd "\n" - || echo "")
if [ -n "$skippedList" ]; then
echo "$skippedList" > /tmp/skipped_packages.txt
fi