Harden repo identity speech names

This commit is contained in:
Meta Vens 2026-06-11 09:06:04 +01:00
commit 4e091a6f45
3 changed files with 84 additions and 4 deletions

View file

@ -1300,7 +1300,11 @@ async function postRepoIdentityIntent(job: JobRecord, intent: RepoIdentityPostIn
if (isNonPublicRepoIdentitySpeech(rawContent)) {
throw new Error(`Repo identity ${identity.id} SAY content is not public speech.`);
}
const content = normalizePublicRepoIdentitySpeech(rawContent);
const content = normalizePublicRepoIdentitySpeech(rawContent, {
identityId: identity.id,
displayName: identity.displayName,
repoName: identity.repoName,
});
if (isNonPublicRepoIdentitySpeech(content)) {
throw new Error(`Repo identity ${identity.id} SAY content is not public speech.`);
}