From 3137cff4a5f0449a41d8900de00b0befa567555a Mon Sep 17 00:00:00 2001 From: shubham-mermaid Date: Fri, 20 Jun 2025 14:07:37 +0530 Subject: [PATCH] Added auto-comment --- .github/workflows/validate-lockfile.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/validate-lockfile.yml b/.github/workflows/validate-lockfile.yml index 90c76cfe2..d1cf1eb13 100644 --- a/.github/workflows/validate-lockfile.yml +++ b/.github/workflows/validate-lockfile.yml @@ -44,3 +44,21 @@ jobs: echo "❌ pnpm-lock.yaml was changed without any package.json" exit 1 fi + + - name: Comment on PR if validation failed + if: failure() + uses: peter-evans/create-or-update-comment@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body: | + ## 🔍 Lockfile Validation Failed + + One or more issues were found in `pnpm-lock.yaml`: + - Tarball references are not allowed. + - `packages/mermaid/src/vitepress` path must not appear in the lockfile. + - `pnpm-lock.yaml` should only change when `package.json` changes. + + Please fix these issues and push an update. + + _Posted automatically by GitHub Actions_