Add YACC as a merge check

Description

Bitbucket merge checks a special type of hook available in the UI which is only applied when pull requests are merged.

Having YACC available as a user check would solve many user use cases. E.g.

  • Some users already have a workflow that enforces pull requests, they don’t want to do checks on intermediate work in feature branches, just to ensure that the merged result is valid.

  • Having a merge check would solve a big issue with the fork workflow – YACC can be off in user’s forks, and all policies will be applied upon merging to the main repo.

Design questions

  • The global settings currently only apply to the pre-receive hook. Should we also add a global way to enable the merge checks?

    • I think we can probably defer this.

Implementation

  • The interface for merge checks is just a specialization of that for hooks, documentation here

  • When running as a merge check, YACC should always scan all commits being pulled in (see as implemented by YACC-252)

  • Make sure to save the settings separately than the hook

Assignee

George V @Mohami

Reporter

George V @Mohami

Sprint

None

Labels

Priority

High
Configure