fix: add rootDir and types to tsconfig.json to resolve TS5011 build error

Agent-Logs-Url: https://github.com/marocchino/sticky-pull-request-comment/sessions/c726777d-ddec-4ced-8af3-0bafb048ce2f

Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-05 07:34:20 +00:00 committed by GitHub
parent 6ef1707d4b
commit c4fbe28317
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 546 additions and 0 deletions

22
dist/validate.js generated vendored Normal file
View file

@ -0,0 +1,22 @@
export function validateBody(body, deleteOldComment, hideOldComment) {
if (!deleteOldComment && !hideOldComment && !body) {
throw new Error("Either message or path input is required");
}
}
export function validateExclusiveModes(deleteOldComment, recreate, onlyCreateComment, onlyUpdateComment, hideOldComment, hideAndRecreate) {
const exclusiveModes = [
["delete", deleteOldComment],
["recreate", recreate],
["only_create", onlyCreateComment],
["only_update", onlyUpdateComment],
["hide", hideOldComment],
["hide_and_recreate", hideAndRecreate],
];
const enabledModes = exclusiveModes.filter(([, flag]) => flag).map(([name]) => name);
if (enabledModes.length > 1) {
const last = enabledModes[enabledModes.length - 1];
const rest = enabledModes.slice(0, -1);
const joined = enabledModes.length === 2 ? `${rest[0]} and ${last}` : `${rest.join(", ")}, and ${last}`;
throw new Error(`${joined} cannot be set to true simultaneously`);
}
}