maiao icon indicating copy to clipboard operation
maiao copied to clipboard

maiao conflicts with husky / pre-commit or pre-push rules

Open jonathanloske opened this issue 7 months ago • 3 comments

Continued from an Adevinta-internal Slack discussion: https://adevinta.slack.com/archives/C018Q6DJNCD/p1700139366823739

Problem description: When running maiao inside a yarn-based repository with pre-commit and pre-push hooks from husky, it fails with the following error: fatal: It seems that there is already a rebase-merge directory, and I wonder if you are in the middle of another rebase. If that is the case, please try [...]. I am not in the middle of a rebase and don't know why the message appears so I can't continue. The tools do the following:

pre-commit runs linting:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged

pre-push runs TypeScript compile check (tsc --noEmit), unit tests (yarn test -- --coverage) and E2E Cypress tests (start-server-and-test dev http://localhost:3000/internal/ping cypress:local:headless):

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn ts:check
yarn test:coverage
yarn e2e:local:headless

Next step to check: removing the individual hook steps one-by-one to see if we can narrow it down to one step or if husky in general is responsible. Will report back here.

jonathanloske avatar Nov 16 '23 15:11 jonathanloske