MCPcopy
hub / github.com/iterative/cml / updateGitConfig

Method updateGitConfig

src/drivers/gitlab.js:506–524  ·  view source on GitHub ↗
({ userName, userEmail, remote } = {})

Source from the content-addressed store, hash-verified

504 }
505
506 async updateGitConfig({ userName, userEmail, remote } = {}) {
507 const repo = new URL(this.repo);
508 repo.password = this.token;
509 repo.username = 'token';
510
511 const commands = [
512 ['git', 'config', 'user.name', userName || this.userName],
513 ['git', 'config', 'user.email', userEmail || this.userEmail],
514 [
515 'git',
516 'remote',
517 'set-url',
518 remote,
519 repo.toString() + (repo.toString().endsWith('.git') ? '' : '.git')
520 ]
521 ];
522
523 return commands;
524 }
525
526 get workflowId() {
527 return CI_PIPELINE_ID;

Callers 4

ciMethod · 0.45
github.e2e.test.jsFile · 0.45
gitlab.e2e.test.jsFile · 0.45

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected