Skip to content

Commit 719201f

Browse files
committed
Set an author when making the commit, not globally
1 parent cf51625 commit 719201f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/build-lint-test.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ jobs:
1515
- run: yarn build
1616
- run: git diff --quiet || { echo 'working directory dirty after "yarn build"'; exit 1; }
1717
- run: yarn lint
18-
- name: 'Set email and name for Git commits'
19-
shell: bash
20-
run: |
21-
git config --global user.email "test@example.com"
22-
git config --global user.name "Test User"
2318
- run: yarn test
2419

2520
all-tests-pass:

tests/helpers/repo.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,13 @@ export default abstract class Repo {
165165
await sleepFor(MIN_TIME_BETWEEN_COMMITS - timeSincePreviousCommit);
166166
}
167167
await this.runCommand('git', ['add', '-A']);
168-
const result = await this.runCommand('git', ['commit', '-m', message]);
168+
const result = await this.runCommand('git', [
169+
'commit',
170+
'--author',
171+
'Test User <test@example.com>',
172+
'--message',
173+
message,
174+
]);
169175
this.#latestCommitTime = now;
170176
return result;
171177
}

0 commit comments

Comments
 (0)