Don't execute git hooks if you create branch as part of other change
What does this MR do?
Currently, our procedure for adding a commit requires us to execute CreateBranchService
before file creation.
It's OK, but also we do execute git hooks
(the PostReceive
sidekiq job) as part of this process.
However, this hook is execute before the file is actually committed, so the ref is updated.
Secondly, we do execute a git hooks
after committing file and updating ref.
This results in duplicate PostReceive
jobs, where the first one is completely invalid.
This change makes the branch creation, something that is intermediate step of bigger process (file creation or update, commit cherry pick or revert) to not execute git hooks.
Why was this MR needed?
Adds a to CreateBranchService
an option to disable hooks execution.
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together