isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

IS-835 Removed all instances of any from GitHubService.ts #1063

Closed QiluXie closed 10 months ago

QiluXie commented 10 months ago

Problem

Closes IS-835

There are 13 instances of any in the file GitHubService.ts. The usage of any should be avoid if possible to maintain the type safety of Typescript.

Solution

Defined explicit types for all instances of any in GitHubService.ts

Breaking Changes

Improvements:

Tests

Clone the branch and run backend locally to confirm there is no error from type checking

seaerchin commented 10 months ago

fyi, i think there's a test spec being skipped due ot this typing change. could i trouble you to update the variable used in the test?

Screenshot 2023-12-19 at 1 26 24 PM
QiluXie commented 10 months ago

fyi, i think there's a test spec being skipped due ot this typing change. could i trouble you to update the variable used in the test?

Screenshot 2023-12-19 at 1 26 24 PM

Thanks for the catch @seaerchin ! Removed unnecessary string declaration of gitTree since it's already defined in the upper scope. Done in 49eeebece8a352c996088cee64d025019bbc2e92 Can you take another look and approve before I merge it?

seaerchin commented 10 months ago

fyi, i think there's a test spec being skipped due ot this typing change. could i trouble you to update the variable used in the test?

Screenshot 2023-12-19 at 1 26 24 PM

Thanks for the catch @seaerchin ! Removed unnecessary string declaration of gitTree since it's already defined in the upper scope. Done in 49eeebe Can you take another look and approve before I merge it?

ci is green, should be fine