Skip to content

[llvm][utils] Handle Issue/PR authors having no display name set#186094

Merged
DavidSpickett merged 4 commits into
llvm:mainfrom
DavidSpickett:llvm-author
Mar 24, 2026
Merged

[llvm][utils] Handle Issue/PR authors having no display name set#186094
DavidSpickett merged 4 commits into
llvm:mainfrom
DavidSpickett:llvm-author

Conversation

@DavidSpickett
Copy link
Copy Markdown
Contributor

@DavidSpickett DavidSpickett commented Mar 12, 2026

user.login is the account name and user.name is an optional display name (often their full name). I got an email generated from a colleague's PR that said:

Author: None (<their username>)

As they hadn't set user.name in their account. Which isn't a problem, but it would be neater if we didn't print None.

So I've added a helper function to handle that. If the user has set both, the output is as it was before, if the user has not, we just show the login name.

The login name can apparently be None too. In that case we'll print "None" for it. This does not seem to be a common case though, and I'm not sure printing anything else would be any more useful.

user.login is the account name and user.name is an optional full
name. I got an email generated from a colleague's PR that said:
Author: None (<their username>)

As they hadn't set user.name in their account. Which isn't a
problem, but it would be neater if we didn't print None.

So I've added a helper function to handle that. If the user has set
both, the output is as it was before, if the user has not, we just show
the account name.
@DavidSpickett
Copy link
Copy Markdown
Contributor Author

"full name" might not be the term for it, but it's hard to find a term that's distinct from username.

I looked in Pygithub and in theory the login name can be None too: https://github.com/PyGithub/PyGithub/blob/main/github/NamedUser.py#L131C13-L132C44

But I don't know how that would be possible. Perhaps if an issue was opened by an account that was later closed / banned / made private?

Actually, I need to account for that. Will update that shortly.

Comment thread llvm/utils/git/github-automation.py Outdated
@DavidSpickett DavidSpickett changed the title [llvm][utils] Handle Issue/PR authors having no full name set [llvm][utils] Handle Issue/PR authors having no display name set Mar 12, 2026
@DavidSpickett
Copy link
Copy Markdown
Contributor Author

A current example of the "None" is #186087 (comment).

Copy link
Copy Markdown
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for making this look slightly better.

@DavidSpickett DavidSpickett merged commit f243d86 into llvm:main Mar 24, 2026
10 checks passed
@DavidSpickett DavidSpickett deleted the llvm-author branch March 24, 2026 09:54
@llvm-ci
Copy link
Copy Markdown

llvm-ci commented Mar 24, 2026

LLVM Buildbot has detected a new failure on builder clangd-ubuntu-tsan running on clangd-ubuntu-clang while building llvm at step 2 "checkout".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/134/builds/37381

Here is the relevant piece of the build log for the reference
Step 2 (checkout) failure: update (failure)
git version 2.17.1
fatal: unable to access 'https://github.com/llvm/llvm-project.git/': Could not resolve host: github.com
fatal: unable to access 'https://github.com/llvm/llvm-project.git/': Could not resolve host: github.com

Aadarsh-Keshri pushed a commit to Aadarsh-Keshri/llvm-project that referenced this pull request Mar 28, 2026
…m#186094)

user.login is the account name and user.name is an optional display name
(often their full name). I got an email generated from a colleague's PR
that said:
```
Author: None (<their username>)
```

As they hadn't set user.name in their account. Which isn't a problem,
but it would be neater if we didn't print None.

So I've added a helper function to handle that. If the user has set
both, the output is as it was before, if the user has not, we just show
the login name.

The login name can apparently be None too. In that case we'll print
"None" for it. This does not seem to be a common case though, and I'm
not sure printing anything else would be any more useful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants