Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn if provided (github?) organisation contains spaces/whitespace or results in unusable build urls #129

Open
acsr opened this issue Jan 24, 2025 · 4 comments

Comments

@acsr
Copy link

acsr commented Jan 24, 2025

Issue with spaces in organisation display title

When cookieplone asks for your organisation and you enter the display name that may contain spaces or uppercase letters, the resulting urls in the make machinery are created using spaces and match not the normalized github urls.

Result: Failing builds and tests

Workaround

I fixed it by manually searching and replacing the spaces with hyphens.

Solution

  1. Add a prominent remark to the docs to use the url part of the organisation as organisation name in the cookieplone dialogue
  2. Drop an validation error if the input does not match the allowed git url schema

I am not sure if you can create a transformation for the repo url of the organisation due to the possibilities to use wider Unicode chracters fotr the actual name and to properly guess the right transformation.

  1. This seems easy for Latin languages but we should leave the arrogance to stress other cultures into our poor lettering system even more limited by ascii codes.
  2. The Plone Community got its strength by the awareness for cultural differences from the beginning. This should be also reflected in the handling of names
@davisagli
Copy link
Member

@acsr You're talking about the question that asks for "GitHub or GitLab Username or Organization", right?

This field is only used for building github URLs. You're supposed to put in the Github organization name that appears in the URL, not a display name. How can we make this clearer? Maybe it would make more sense to ask for the github repository URL and then parse out the owner (org name) and repository name from that.

@davisagli
Copy link
Member

@acsr Moving to cookieplone-templates because this question is part of specific templates, not the cookieplone framework.

@davisagli davisagli transferred this issue from plone/cookieplone Jan 24, 2025
@stevepiercy
Copy link
Contributor

I don't think that the prompt can be more clear, unless you explicitly state "lowercase letters and numbers only", and that might be too long. See sample output at https://6.docs.plone.org/install/create-project-cookieplone.html#generate-the-project.

  [13/17] GitHub or GitLab Username or Organization (collective): 

I would enforce validation, and reject anything that is not compliant with what is outside our control, similar to project slug. I would not normalize, as that is prone to error.

@acsr
Copy link
Author

acsr commented Jan 25, 2025

@stevepiercy wrote:

I don't think that the prompt can be more clear,

After rethinking and one day I thought this does the job (see alternative down below):

[13/17] GitHub or GitLab Username or Organization as normalized in urls (collective): 

but… it can be better…

Communication and Understanding in Context

The second "or" in the prompt confuses during understanding.
With "Username" you normally have some connotation to be normalized but switching context to just "Organisation" leaves this connotation behind. This is not logical, but human way of thinking. There are different ways to to understand the prompts, coming from different contexts.

Another more precise form is:

[13/17] GitHub-, GitLab-User (or -Organization) Username from url (collective):

Error Messages not precise enough

The given error messages did not help to understand the issue at first view. Often the developers are aware of the needs already and fail to recognize the possible hurdles because they meet the expectation intuitively. The challenge to create the slug for the project name is obvious. But we had similar challenges at first with the levels of namespaces that were overseen as well in the initial release.

Same trap again

I thought I had fixed all the occurences of the organisation name already yesterday. Then I started the deploy steps and was trapped again when the space showed up again in url in multiple places. No idea from which place it came from again.

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

No branches or pull requests

3 participants