An open source design system that's fully customizable and agent ready
TypeScript
ci(review): ignore comment lines when parsing owner files (#3849)
Cindy Zhang67b423ea843c
diff --git a/.github/workflows/review-signal.yml b/.github/workflows/review-signal.ymlindex fa52d8f1ea..1978977afb 100644--- a/.github/workflows/review-signal.yml+++ b/.github/workflows/review-signal.yml@@ -152,7 +152,13 @@ jobs:.find((l) => l.startsWith('*'));text = star || '';}- return (text.match(/@[A-Za-z0-9-]+/g) || [])+ // Strip comment lines (# ...) so an @handle mentioned in a+ // file header comment is not parsed as a real owner.+ const body = text+ .split('\n')+ .filter((l) => !l.trim().startsWith('#'))+ .join('\n');+ return (body.match(/@[A-Za-z0-9-]+/g) || []).map((h) => h.slice(1).toLowerCase());} catch (e) {core.warning(`Could not read ${path}: ${e.message}`);@@ -501,7 +507,13 @@ jobs:.find((l) => l.startsWith('*'));text = star || '';}- return (text.match(/@[A-Za-z0-9-]+/g) || [])+ // Strip comment lines (# ...) so an @handle mentioned in a+ // file header comment is not parsed as a real owner.+ const body = text+ .split('\n')+ .filter((l) => !l.trim().startsWith('#'))+ .join('\n');+ return (body.match(/@[A-Za-z0-9-]+/g) || []).map((h) => h.slice(1).toLowerCase());} catch (e) {core.warning(`Could not read ${path}: ${e.message}`);