@mikitasazan/notify 1.10.0 → 1.10.1

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.
Files changed (2) hide show
  1. package/dist/lint.js +14 -2
  2. package/package.json +1 -1
package/dist/lint.js CHANGED
@@ -83,8 +83,20 @@ export const lintCard = (html) => {
83
83
  found.push(`"${m[1]}: ${m[2]}" — a signed number is not a comparison`);
84
84
  }
85
85
  }
86
- if (/all good/i.test(html)) {
87
- found.push('"all good" is a status, not a recommendation');
86
+ // Only when it IS the value of a row or a list item. The first shape of this
87
+ // rule read the whole card, so a deploy card quoting the words inside a
88
+ // commit body — the very commit that removed `all good` from the reports —
89
+ // raised a complaint about itself.
90
+ for (const row of rows) {
91
+ const value = row
92
+ .replace(/^•\s*/, '')
93
+ .replace(/^<b>[^<]*:<\/b>\s*/, '')
94
+ .replace(/<[^>]+>/g, '')
95
+ .trim();
96
+ if (/^all good$/i.test(value)) {
97
+ found.push('"all good" is a status, not a recommendation');
98
+ break;
99
+ }
88
100
  }
89
101
  return found;
90
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikitasazan/notify",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "Единая типизированная отправка Telegram-уведомлений (форум-темы, маршрутизация, ретраи) для всех проектов",
5
5
  "type": "module",
6
6
  "license": "MIT",