uselagoon / lagoon-ui

Apache License 2.0
6 stars 2 forks source link

change: add branches and pullrequests during org project creation #276

Closed DaveDarsa closed 9 hours ago

DaveDarsa commented 4 days ago

will close #267

Screenshot 2024-07-01 at 01 26 10

@shreddedbacon if branches and pullrequests aren't provided they're set to true, but the api doesn't allow non-string values, so currently this PR sends values as stringified values. seems wrong

shreddedbacon commented 4 days ago

branches and pullrequests are string values, so they should be free text boxes that are optionally filled in by the user

the API will default these to a string representation of "true" if they are not provided.

shreddedbacon commented 3 days ago

Can we put a tooltip (?) next to branches and pullrequests that expands what the API has in the descriptions for those fields? It might be a bit helpful

    """
    Which branches should be deployed, can be one of:
    - \`true\` - all branches are deployed
    - \`false\` - no branches are deployed
    - REGEX - regex of all branches that should be deployed, example: \`^(main|staging)$\`
    """
    branches: String
    """
    Which Pull Requests should be deployed, can be one of:
    - \`true\` - all pull requests are deployed
    - \`false\` - no pull requests are deployed
    - REGEX - regex of all Pull Request titles that should be deployed, example: \`[BUILD]\`
    """
    pullrequests: String

Maybe tidied up a bit to fit better in a tooltip, something like these:

Branches

Which Pull Requests should be deployed, can be one of:
- true - all branches are deployed
- false - no branches are deployed
- regex of all branches that can be deployed (including production), example: '^(main|staging)$'

Pullrequests

Which branches should be deployed, can be one of:
- true - all pull requests are deployed
- false - no pull requests are deployed
- regex of all Pull Request titles that can be deployed, example: '[BUILD]'
shreddedbacon commented 2 days ago

Hmm, bit too spacey? image

shreddedbacon commented 14 hours ago

This looks fine. I wonder if the first - of each line could be a dot though maybe? image

Like this