Builds: default string for Organizations dropdown if user does not have "name"#5060
Merged
steverydz merged 1 commit intocanonical:mainfrom Mar 14, 2025
Merged
Builds: default string for Organizations dropdown if user does not have "name"#5060steverydz merged 1 commit intocanonical:mainfrom
steverydz merged 1 commit intocanonical:mainfrom
Conversation
|
lorenzo-medici is not a collaborator of the repo |
…'t have 'Name' set
Contributor
Author
|
Apologies for the push and build spam. By mistake I didn't include the change fixing the linting problem. |
steverydz
approved these changes
Mar 14, 2025
Contributor
steverydz
left a comment
There was a problem hiding this comment.
LGTM 👍
Thanks for the fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem I encountered is that the Organizations dropdown had the list of organizations that my GitHub account is a part of, and then a blank entry that represents the repos owned by my user. I checked out the source code of that page and it uses the
nameattribute of the GH user, which is optional.My user didn't have it set so the entry was empty. The issue is cosmetic/UX only, as clicking on the black entry still shows the user's own repos and everything is connected successfully.
Done
Added the
loginattribute of the GH user as default value for the label of the dropdown entry representing the user's repos.Unfortunately, I wasn't able to get a working test environment due to yarn and/or node version issues, even in a fresh VM, so this change is completely untested either by a human on the website, or by automated tests.
Running
dotrunresults inwhich I wasn't able to resolve. If you have any guidance on how to get a working test environment I'd be more than happy to manually test the change and add unit tests for this.
I think the change is so small an inconsequential that it might not be necessary, but the decision is for the maintainers to take.
How to QA
Testing
Issue / Card
Fixes #5034
Screenshots
I don't have a snap that is not connected to a GH repo and I don't see the use in creating a new one just for this, so I cannot provide screenshots. The issue can be replicated starting from any snap that is not connected to a GH repo (or a brand new snap), going to the Builds page, logging in to GH with a user that does not have the
nameproperty set, and clicking on the Organizations dropdown. What is currently happening is that the first entry is blank. After the change, the blank entry would be replaced with the GH username.