Skip to content

Commit ffbc85b

Browse files
authored
Set git user details (exercism#7906)
1 parent bfca52b commit ffbc85b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

app/commands/user/github_solution_syncer/create_pull_request.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@ def base_sha
3838
# If it doesn't, then this is a naked repo, so create it.
3939
Dir.mktmpdir do |dir|
4040
@path = dir
41-
4241
# No existing branch so create it
4342
git "init", "-b", base_branch
43+
44+
# Make sure we have the right user set
45+
git "config", "user.name", "Exercism's Solution Syncer Bot"
46+
git "config", "user.email", "211797793+exercism-solutions-syncer[bot]@users.noreply.github.com"
47+
48+
# Make an empty commit and push it
4449
git "commit", "--allow-empty", "-m", "Initial empty commit"
4550
git "remote", "add", "origin", repo_url
4651
git "push", "origin", base_branch

app/commands/user/github_solution_syncer/local_git_repo.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ def repo = syncer.repo_full_name
5353
def clone_repo
5454
git("clone", "--depth=1", repo_url, ".")
5555

56+
# Make sure we have the right user set
57+
git "config", "user.name", "Exercism's Solution Syncer Bot"
58+
git "config", "user.email", "211797793+exercism-solutions-syncer[bot]@users.noreply.github.com"
59+
5660
begin
5761
git("checkout", base_branch_name)
5862
rescue RuntimeError

0 commit comments

Comments
 (0)