Introduce reusable event-discrimination helpers in src/github/types.ts (for example, helpers that normalize access to issue/PR metadata and comment targets), then replace repeated checks like 'issue' in ... and 'pull_request' in ... across src/github/comments.ts, src/github/progress.ts, src/github/reactions.ts, and src/github/runAction.ts. This should remove duplicated branching logic, improve type safety, and make behavior for issue vs PR events consistent. Add focused tests (or update existing ones) to confirm equivalent behavior for both event types.
Introduce reusable event-discrimination helpers in
src/github/types.ts(for example, helpers that normalize access to issue/PR metadata and comment targets), then replace repeated checks like'issue' in ...and'pull_request' in ...acrosssrc/github/comments.ts,src/github/progress.ts,src/github/reactions.ts, andsrc/github/runAction.ts. This should remove duplicated branching logic, improve type safety, and make behavior for issue vs PR events consistent. Add focused tests (or update existing ones) to confirm equivalent behavior for both event types.