Skip to content

Commit c45cfda

Browse files
committed
build: use token based auth for CI
1 parent 81a5326 commit c45cfda

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

packages/build-utils/src/executors/sync-dependencies/executor.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ function commitToPrevious(baseBranch: string, remote: string) {
3333
const diffCommand = `git diff HEAD`;
3434
const addCommand = `git add .`;
3535
const commitToPreviousCommand = `git commit --no-edit -m "chore: [skip ci] sync dependencies"`;
36+
// reset the original remote to allow bypass branch protection
37+
const remoteCommand = 'git remote remove origin && git remote add origin https://${GH_TOKEN}@github.com/scalprum/scaffolding.git';
3638
const pushCommand = `git push ${remote} ${baseBranch}`;
3739
// check if there are any changes to be committed
3840
const isDiff = execSync(diffCommand).toString().length > 0;
3941
if (isDiff) {
42+
execSync(remoteCommand);
4043
execSync(addCommand);
4144
execSync(commitToPreviousCommand);
4245
execSync(pushCommand);

packages/core/project.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"version": {
3535
"executor": "@jscutlery/semver:version",
3636
"options": {
37-
"push": true,
3837
"preset": "conventionalcommits"
3938
}
4039
},

packages/react-core/project.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"executor": "@jscutlery/semver:version",
3232
"options": {
3333
"trackDeps": true,
34-
"push": true,
3534
"preset": "conventionalcommits"
3635
}
3736
},

packages/react-test-utils/project.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"executor": "@jscutlery/semver:version",
3232
"options": {
3333
"trackDeps": true,
34-
"push": true,
3534
"preset": "conventionalcommits"
3635
}
3736
},

0 commit comments

Comments
 (0)