pr-pull: handle empty string cases
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
bada8dd759
commit
9cab9b7f39
@ -424,13 +424,13 @@ module GitHub
|
|||||||
next if commit.present? && commit != r["commit"]["oid"]
|
next if commit.present? && commit != r["commit"]["oid"]
|
||||||
next unless %w[MEMBER OWNER].include? r["authorAssociation"]
|
next unless %w[MEMBER OWNER].include? r["authorAssociation"]
|
||||||
|
|
||||||
email = if r["author"]["email"].empty?
|
email = if r["author"]["email"].blank?
|
||||||
"#{r["author"]["databaseId"]}+#{r["author"]["login"]}@users.noreply.github.com"
|
"#{r["author"]["databaseId"]}+#{r["author"]["login"]}@users.noreply.github.com"
|
||||||
else
|
else
|
||||||
r["author"]["email"]
|
r["author"]["email"]
|
||||||
end
|
end
|
||||||
|
|
||||||
name = r["author"]["name"] || r["author"]["login"]
|
name = r["author"]["name"].presence || r["author"]["login"]
|
||||||
|
|
||||||
{
|
{
|
||||||
"email" => email,
|
"email" => email,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user