Skip to content

Commit 6b3fbdd

Browse files
committed
feat: add git name and email config.
1 parent 037f9e9 commit 6b3fbdd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

roomy-pages-backup/main.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ const leafServerEnv = "LEAF_SERVER";
2020
const usernameEnv = "ATPROTO_USERNAME";
2121
const passwordEnv = "ATPROTO_APP_PASSWORD";
2222
const leafStreamEnv = "ROOMY_SPACE";
23+
const gitEmailEnv = "GIT_EMAIL";
24+
const gitNameEnv = "GIT_NAME";
2325
const username = process.env[usernameEnv];
2426
const leafServer = process.env[leafServerEnv] || "https://leaf.muni.town";
2527
const password = process.env[passwordEnv];
2628
const leafStream = process.env[leafStreamEnv];
2729
const gitRemote = process.env[gitRemoteEnv];
30+
const gitEmail = process.env[gitEmailEnv];
31+
const gitName = process.env[gitNameEnv];
32+
2833
if (!username) throw `${usernameEnv} env var required.`;
2934
if (!password) throw `${passwordEnv} env var required.`;
3035
if (!leafStream) throw `${leafStreamEnv} env var required.`;
@@ -56,6 +61,9 @@ if (gitRemote) {
5661
}
5762
}
5863

64+
if (gitEmail) repo.addConfig("user.email", gitEmail);
65+
if (gitName) repo.addConfig("user.name", gitName);
66+
5967
const agent = new AtpAgent({ service: "https://bsky.social" });
6068
await agent.login({
6169
identifier: username,

0 commit comments

Comments
 (0)