2020-07-24 11:54:44 -04:00
|
|
|
import {DevInfraMergeConfig} from '../dev-infra/pr/merge/config';
|
|
|
|
import {getDefaultTargetLabelConfiguration} from '../dev-infra/pr/merge/defaults';
|
|
|
|
import {github} from './github';
|
2020-09-09 08:42:34 -04:00
|
|
|
import {release} from './release';
|
2020-07-02 08:08:29 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
|
|
|
|
* are respected by the merge script (e.g. the target labels).
|
|
|
|
*/
|
2020-07-24 11:54:44 -04:00
|
|
|
export const merge: DevInfraMergeConfig['merge'] = async api => {
|
2020-07-02 08:08:29 -04:00
|
|
|
return {
|
|
|
|
githubApiMerge: false,
|
|
|
|
claSignedLabel: 'cla: yes',
|
2020-08-27 19:30:59 -04:00
|
|
|
mergeReadyLabel: /^action: merge(-assistance)?/,
|
2020-10-26 12:51:29 -04:00
|
|
|
caretakerNoteLabel: /^(action: merge-assistance)|(PullApprove: disable)/,
|
2020-07-02 08:08:29 -04:00
|
|
|
commitMessageFixupLabel: 'commit message fixup',
|
2020-09-09 08:42:34 -04:00
|
|
|
// We can pick any of the NPM packages as we are in a monorepo where all packages are
|
|
|
|
// published together with the same version and branching.
|
|
|
|
labels: await getDefaultTargetLabelConfiguration(api, github, release),
|
2020-07-02 08:08:29 -04:00
|
|
|
requiredBaseCommits: {
|
|
|
|
// PRs that target either `master` or the patch branch, need to be rebased
|
|
|
|
// on top of the latest commit message validation fix.
|
|
|
|
// These SHAs are the commits that update the required license text in the header.
|
|
|
|
'master': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a',
|
2020-08-27 19:30:59 -04:00
|
|
|
'10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24',
|
2020-07-02 08:08:29 -04:00
|
|
|
},
|
2021-04-06 11:23:12 -04:00
|
|
|
targetLabelExemptScopes: ['dev-infra', 'docs-infra']
|
2020-07-02 08:08:29 -04:00
|
|
|
};
|
|
|
|
};
|