diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c27bbcde27..910c382939 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -25,6 +25,8 @@ jobs: steps: - name: Checkout repository content uses: actions/checkout@v3 + with: + fetch-depth: 2 - name: Count number of lines run: | @@ -49,8 +51,17 @@ jobs: - name: Install Dependencies run: npm ci + - name: Get changed files + id: changed_files + uses: tj-actions/changed-files@v42 + with: + files: | + **.ts + - name: Run ESLint to check for linting errors in modified files - run: npx eslint $(git diff --name-only --diff-filter=d ${{ github.sha }}^1 -- '***.ts') + env: + CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} + run: npx eslint ${CHANGED_FILES} - name: Check for formatting errors run: npm run format:check diff --git a/src/app.ts b/src/app.ts index e3eeef04d3..e26d89fda3 100644 --- a/src/app.ts +++ b/src/app.ts @@ -11,7 +11,6 @@ import { appConfig } from "./config"; import { requestContext, requestTracing, stream } from "./libraries"; //@ts-ignore import graphqlUploadExpress from "graphql-upload/graphqlUploadExpress.mjs"; - const app = express(); app.use(requestTracing.middleware()); diff --git a/src/checks.ts b/src/checks.ts index 425f980c17..41147f2781 100644 --- a/src/checks.ts +++ b/src/checks.ts @@ -3,7 +3,6 @@ import { User } from "./models"; import { generateErrorMessage } from "zod-error"; import { getEnvIssues } from "./env"; import { logger } from "./libraries"; - const logWarningForSuperAdminEnvVariable = async (): Promise => { const superAdminExist = await User.exists({ userType: "SUPERADMIN" }); const isVariablePresentInEnvFile = !!LAST_RESORT_SUPERADMIN_EMAIL;