diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index ecc733d79..0ee63394e 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -24,7 +24,8 @@ jobs: uses: silverhand-io/actions-node-pnpm-run-steps@v4 - name: Commitlint - run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD + # Credit to https://stackoverflow.com/a/67365254/12514940 + run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose - name: Commitlint on PR title run: echo '${{ github.event.pull_request.title }}' | npx commitlint diff --git a/packages/integration-tests/src/tests/api/admin-user.test.ts b/packages/integration-tests/src/tests/api/admin-user.test.ts index d11369425..9fb1e54d3 100644 --- a/packages/integration-tests/src/tests/api/admin-user.test.ts +++ b/packages/integration-tests/src/tests/api/admin-user.test.ts @@ -178,9 +178,10 @@ describe('admin console user management', () => { }); it('should update user password successfully', async () => { - const user = await createUserByAdmin(); - const userEntity = await updateUserPassword(user.id, 'new_password'); - expect(userEntity).toMatchObject(user); + const { updatedAt, ...rest } = await createUserByAdmin(); + const userEntity = await updateUserPassword(rest.id, 'new_password'); + expect(userEntity).toMatchObject(rest); + expect(userEntity.updatedAt).toBeGreaterThan(updatedAt); }); it('should link social identity successfully', async () => { diff --git a/packages/schemas/tables/_functions.sql b/packages/schemas/tables/_functions.sql index b65236866..4a6184f62 100644 --- a/packages/schemas/tables/_functions.sql +++ b/packages/schemas/tables/_functions.sql @@ -14,7 +14,7 @@ $$ begin return new; end; $$ language plpgsql; -/** A function to set the created_at column to the current time. */ +/** A function to set the `updated_at` column to the current time. */ create function set_updated_at() returns trigger as $$ begin new.updated_at = now();