Skip to content

Conversation

@agatha197
Copy link
Contributor

@agatha197 agatha197 commented Jan 21, 2026

Resolves #5060 (FR-1922)

Improved URL validation for GitHub and GitLab repository imports

This PR enhances the validation of GitHub and GitLab repository URLs during import by:

  1. Implementing more precise regex patterns that validate specific URL formats:
    • For GitHub: Allows https://github.com/owner/repo, https://github.com/owner/repo/, or https://github.com/owner/repo/tree/branch
    • For GitLab: Allows https://gitlab.com/owner/repo, https://gitlab.com/owner/repo/, or https://gitlab.com/owner/repo/-/tree/branch
  2. Extracting the regex patterns into named constants (GITHUB_URL_REGEX and GITLAB_URL_REGEX) for better code organization and reusability

Checklist:

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

@github-actions github-actions bot added the size:S 10~30 LoC label Jan 21, 2026
Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.81% (-0% 🔻)
612/12728
🔴 Branches 4.42% 394/8904
🔴 Functions 2.7% 104/3855
🔴 Lines
4.65% (-0% 🔻)
578/12435

Test suite run success

181 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from d9180e8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10~30 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

missing validation of importing github repository

2 participants