File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,8 @@ head_repo=$(echo "$pr_info" | jq -r '.headRepository.nameWithOwner')
22
22
is_fork=$( echo " $pr_info " | jq -r ' .isCrossRepository' )
23
23
24
24
# Get the PR author's name and email
25
- author_info=$( gh api " /users/$pr_author " --jq ' {name: .name, email: .email}' )
26
- author_name=$( echo " $author_info " | jq -r ' .name // .login' )
27
- # Use GitHub's noreply email format if no public email
28
- author_email=$( echo " $author_info " | jq -r ' .email // empty' )
29
- if [[ -z " $author_email " || " $author_email " == " null" ]]; then
30
- # Get user ID for noreply email format
31
- user_id=$( gh api " /users/$pr_author " --jq ' .id' )
32
- author_email=" ${user_id} +${pr_author} @users.noreply.github.com"
33
- fi
25
+ user_id=$( gh api " /users/$pr_author " --jq ' .id' )
26
+ author_email=" ${user_id} +${pr_author} @users.noreply.github.com"
34
27
35
28
# Create a temporary worktree to do the squashing
36
29
worktree_dir=$( mktemp -d)
@@ -43,7 +36,7 @@ git worktree add "$worktree_dir" HEAD
43
36
cd " $worktree_dir "
44
37
45
38
# Configure git with author's identity in worktree
46
- git config user.name " $author_name "
39
+ git config user.name " $pr_author "
47
40
git config user.email " $author_email "
48
41
49
42
# Save our current branch commits
You can’t perform that action at this time.
0 commit comments