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

Support more formats of input for repo url #25

Open
dmwyatt opened this issue Mar 31, 2024 · 0 comments
Open

Support more formats of input for repo url #25

dmwyatt opened this issue Mar 31, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dmwyatt
Copy link
Owner

dmwyatt commented Mar 31, 2024

Description:

Enhance the flexibility of the GitHub repository URL input field on our form.

Objective:

Update the repository URL form field to handle the following input variations and normalize inputs:

  1. Domain included: github.com/user/repo
  2. Short form: user/repo
  3. Full URL: https://github.com/user/repo
  4. queries or fragments: https://github.com/user/repo?query=string#fragment. Remove them.

Tasks:

  1. Review Current Implementation: RepositoryURLForm is where most of the work should happen.

  2. Update Validation Logic: Ensure the validate_repo_url function can accurately validate the supported input formats.

  3. Enhance Cleaning Logic: Modify the clean_repo_url method to:

    • Normalize input to a standard format, prepending https://github.com/ where necessary.
    • Remove any query parameters or fragments from the URL.
  4. Implement and update Test Cases: Create/update tests to confirm:

    • Acceptance and correct normalization of all supported formats.
    • Effective stripping of query parameters and fragments.
    • Proper functioning of both client and server-side validation mechanisms.
  5. Documentation Update: Revise documentation to clearly explain the input formats supported and the behavior regarding extraneous URL components.

@dmwyatt dmwyatt added enhancement New feature or request good first issue Good for newcomers labels Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant