MCPcopy Create free account
hub / github.com/code-pushup/cli / generateGitLabYaml

Function generateGitLabYaml

packages/create-cli/src/lib/setup/ci.ts:106–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106function generateGitLabYaml(): string {
107 const lines = [
108 'workflow:',
109 ' rules:',
110 ' - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH',
111 " - if: $CI_PIPELINE_SOURCE == 'merge_request_event'",
112 '',
113 'include:',
114 ' - https://gitlab.com/code-pushup/gitlab-pipelines-template/-/raw/latest/code-pushup.yml',
115 ];
116 return `${lines.join('\n')}\n`;
117}
118
119async function patchRootGitLabConfig(tree: Tree): Promise<void> {
120 const content = await tree.read(GITLAB_CONFIG_PATH);

Callers 1

writeGitLabConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected