@cleartrip/frontguard 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleartrip/frontguard",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Org-wide frontend PR guardrails: linting, hygiene, any-delta, cycles, dead code, bundle/CWV hints, custom rules, optional LLM brief",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,6 +16,15 @@
16
16
  # Duplicate comments: each run adds a new comment. To upsert one comment, add a script that
17
17
  # GETs /pullrequests/{id}/comments and DELETEs or updates the previous FrontGuard comment.
18
18
  #
19
+ # ⚠️ CRITICAL — What to POST as the PR comment:
20
+ # Use ONLY `frontguard-pr-comment.md` (short, plain summary + pipeline URL for the HTML artifact).
21
+ # NEVER POST `frontguard-report.md` or the raw `yarn frontguard run` stdout — that is the full
22
+ # markdown report and will look like a wall of `##` / `|` if something goes wrong, and is
23
+ # unreadable in a PR thread. The interactive HTML is `frontguard-report.html` (Artifacts).
24
+ #
25
+ # API: body MUST be `{"content":{"raw":"<text>"}}` only. Do not add `content.markup` — Bitbucket
26
+ # returns 400 "extra keys not allowed". Markdown in `raw` is still rendered when possible.
27
+ #
19
28
  # PR comments: Bitbucket Markdown is limited (no raw HTML). To share the rich HTML report:
20
29
  #
21
30
  # A) Default (no extra setup): the comment links to **this pipeline’s results page**. That URL works for
@@ -56,6 +65,7 @@ pipelines:
56
65
  --htmlOut frontguard-report.html \
57
66
  --prCommentOut frontguard-pr-comment.md \
58
67
  > frontguard-report.md
68
+ - grep -q "FrontGuard report (short summary)" frontguard-pr-comment.md || { echo "frontguard-pr-comment.md missing or wrong FrontGuard version; upgrade @cleartrip/frontguard and keep --prCommentOut"; exit 1; }
59
69
  # Optional: upload HTML to repo Downloads, then append a second link to the comment file.
60
70
  # Requires a token with permission to POST /downloads (often `repository:write` in addition to PR comment).
61
71
  # - FG_REPORT_NAME="frontguard-pr-${BITBUCKET_PR_ID}-b${BITBUCKET_BUILD_NUMBER}.html"