Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The goal of Pre-receive (push) Hook is to validate validates all incoming commits as they first appear in a repository. So, if If changes are validated once, they won’t be are not checked by the pre-receive hook again.

A Merge Checkvalidates all commits included into Pull Request in a pull request (YACC does this even if they were checked already), which allows to postpone changes validation till Pull Request creation / approval. If you haven’t enabled push-. This allows postponing validation until the pull request merge, rather than at the time the changes are pushed. If you have not enabled Pre-receive (push) hook, incoming changes will are not be validated during a push.

Note, that Pull Request merge may can create new commits with new hashes , which haven’t have not been validated yet, so a Pre-receive (push-) hook should step in here and validate them on merge. This may happen in cases like theseFor example:

  • merge

...

  • commit for

...

  • the pull

...

  • request

...

  • . This can be excluded by enabling the Exclude Merge Commits option.

  • merge strategies like history-modifying commits

...

  • created with

...

...

  • . Recommendation: avoid using these merge strategies. Contact Support if you encounter any issues.

  • commits introduced by fork / sync / resolve-conflicts / upmerge workflows

...

You can use Pre-receive (push) Hook and Merge Check independently , with a separate sets of settings. Or , or you may can enable them both together, to combine validation of some rules as they are committed and postponing postpone some checks until a Pull Request merge.