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')
2222is_fork=$( echo " $pr_info " | jq -r ' .isCrossRepository' )
2323
2424# 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"
3427
3528# Create a temporary worktree to do the squashing
3629worktree_dir=$( mktemp -d)
@@ -43,7 +36,7 @@ git worktree add "$worktree_dir" HEAD
4336cd " $worktree_dir "
4437
4538# Configure git with author's identity in worktree
46- git config user.name " $author_name "
39+ git config user.name " $pr_author "
4740git config user.email " $author_email "
4841
4942# Save our current branch commits
You can’t perform that action at this time.
0 commit comments