Skip to content

Commit 222a4cc

Browse files
Debanitrklclaude
andcommitted
fix: address review comments — demo link, input sanitization, duplicate check
- Replace demo.parseable.com with app.parseable.com (demo is no longer live) - Sanitize user-supplied fields (escape pipes, strip newlines) before inserting into USERS.md table row - Improve duplicate detection: parse existing org names from USERS.md and do exact match instead of substring includes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5a155fa commit 222a4cc

2 files changed

Lines changed: 22 additions & 8 deletions

File tree

.github/workflows/add-adopter.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,18 @@ jobs:
6969
ref: 'main'
7070
});
7171
const usersContent = Buffer.from(fileData.content, 'base64').toString('utf-8');
72-
const orgNameLower = orgName.toLowerCase();
73-
74-
if (usersContent.toLowerCase().includes(orgNameLower)) {
72+
const orgNameLower = orgName.toLowerCase().trim();
73+
74+
// Parse existing org names from USERS.md for exact match
75+
const existingOrgs = usersContent.split('\n')
76+
.filter(line => line.startsWith('|'))
77+
.map(line => {
78+
const match = line.match(/\|\s*\[([^\]]+)\]/);
79+
return match ? match[1].toLowerCase().trim() : null;
80+
})
81+
.filter(Boolean);
82+
83+
if (existingOrgs.includes(orgNameLower)) {
7584
await github.rest.issues.createComment({
7685
owner: context.repo.owner,
7786
repo: context.repo.repo,
@@ -93,15 +102,20 @@ jobs:
93102
return;
94103
}
95104
105+
// Sanitize user input for markdown table
106+
const sanitize = (str) => str.replace(/\|/g, '\\|').replace(/\n/g, ' ').trim();
107+
96108
// Build contact link
97-
let contactCell = contact;
109+
let contactCell = sanitize(contact);
98110
if (contact.startsWith('@')) {
99-
const handle = contact.substring(1);
111+
const handle = contact.substring(1).trim();
100112
contactCell = `[@${handle}](https://github.com/${handle})`;
101113
}
102114
103115
// Append new row to USERS.md
104-
const newRow = `| [${orgName}](${orgUrl}) | ${contactCell} | ${description} |`;
116+
const safeDesc = sanitize(description);
117+
const safeOrgName = sanitize(orgName);
118+
const newRow = `| [${safeOrgName}](${orgUrl}) | ${contactCell} | ${safeDesc} |`;
105119
const updatedContent = usersContent.trimEnd() + '\n' + newRow + '\n';
106120
107121
// Create branch

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
[![Docs](https://img.shields.io/badge/stable%20docs-parseable.com%2Fdocs-brightgreen?style=flat&color=%2373DC8C&label=Docs)](https://logg.ing/docs)
1414
[![Build](https://img.shields.io/github/checks-status/parseablehq/parseable/main?style=flat&color=%2373DC8C&label=Checks)](https://github.com/parseablehq/parseable/actions)
1515

16-
[Key Concepts](https://www.parseable.com/docs/key-concepts) | [Features](https://www.parseable.com/docs/features/alerts) | [Documentation](https://www.parseable.com/docs) | [Demo](https://demo.parseable.com/login) | [FAQ](https://www.parseable.com/docs/key-concepts/data-model#faq)
16+
[Key Concepts](https://www.parseable.com/docs/key-concepts) | [Features](https://www.parseable.com/docs/features/alerts) | [Documentation](https://www.parseable.com/docs) | [Demo](https://app.parseable.com) | [FAQ](https://www.parseable.com/docs/key-concepts/data-model#faq)
1717

1818
</div>
1919

20-
Parseable is a full-stack observability platform built to ingest, analyze and extract insights from all types of telemetry (MELT) data. You can run Parseable on your local machine, in the cloud, or use [Parseable Cloud](https://app.parseable.com) — the fully managed service. To experience Parseable UI, checkout [demo.parseable.com ↗︎](https://demo.parseable.com/login).
20+
Parseable is a full-stack observability platform built to ingest, analyze and extract insights from all types of telemetry (MELT) data. You can run Parseable on your local machine, in the cloud, or use [Parseable Cloud](https://app.parseable.com) — the fully managed service. To experience Parseable UI, checkout [app.parseable.com ↗︎](https://app.parseable.com).
2121

2222
<div align="center">
2323
<h3>

0 commit comments

Comments
 (0)