Skip to content

feat: support dot in repo owner and repo name#133

Merged
dkorecko merged 1 commit intomainfrom
feature/support-dot
Mar 27, 2026
Merged

feat: support dot in repo owner and repo name#133
dkorecko merged 1 commit intomainfrom
feature/support-dot

Conversation

@dkorecko
Copy link
Copy Markdown
Owner

@dkorecko dkorecko commented Mar 27, 2026

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Added support for parsing GitHub repositories with dots (.) in the owner or repository name, enabling proper version detection for such repositories.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

📝 Walkthrough

Walkthrough

The changes extend GitHub repository parsing to support repository names containing dots by updating regex patterns, introducing test data constants for a dotted repository, and adding a new test case validating the enhanced pattern matching functionality.

Changes

Cohort / File(s) Summary
Test Data Constants
PatchPanda.Units/TestData.cs
Added two public constants (DOT_OWNER and DOT_REPO) representing a repository with dots in its name for use in test scenarios.
Test Coverage
PatchPanda.Units/Helpers/ParsingHelperTests.cs
Updated an existing test with a trailing comma and added new test case SetGitHubRepo_SetsRepo_WhenRepositoryContainsDot to validate parsing and regex matching for dotted repository names.
Regex Pattern Updates
PatchPanda.Web/Helpers/ParsingHelper.cs
Expanded character set in regex patterns from [a-zA-Z0-9_-]+ to [a-zA-Z0-9_.-]+ to include dots when extracting repository owner and name from GitHub URLs and image paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰✨ A dot, a dash, a name so fine,
Now parsed with regex so divine!
The bunny hops through patterns new,
Where dots and dashes both ring true! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: expanding regex patterns to allow dots in repository owner and repo names, with supporting test cases and test data.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/support-dot

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@PatchPanda.Units/Helpers/ParsingHelperTests.cs`:
- Around line 215-252: Add a new unit test to cover the GitHub URL extraction
path for dot-containing repos: create a test similar to
SetGitHubRepo_SetsRepo_WhenRepositoryContainsDot but set response.Image to the
GitHub URL (e.g.,
$"https://github.com/{TestData.DOT_OWNER}/{TestData.DOT_REPO}"), create a
release with that URL via CreateRelease, mock IVersionService.GetVersions to
return the release when passed the tuple (TestData.DOT_OWNER,
TestData.DOT_REPO), call container.SetGitHubRepo(response,
versionServiceMock.Object, logger) and assert container.GitHubRepo equals new
Tuple(TestData.DOT_OWNER, TestData.DOT_REPO) and container.GitHubVersionRegex
equals VersionHelper.BuildRegexFromVersion(TestData.NEW_VERSION) to ensure the
GitHub URL regex path in ParsingHelper.cs is exercised.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c9691329-c73a-4a64-8f75-009de1c2895d

📥 Commits

Reviewing files that changed from the base of the PR and between d67ce84 and 52d42bf.

📒 Files selected for processing (3)
  • PatchPanda.Units/Helpers/ParsingHelperTests.cs
  • PatchPanda.Units/TestData.cs
  • PatchPanda.Web/Helpers/ParsingHelper.cs

@dkorecko dkorecko merged commit f5011fd into main Mar 27, 2026
6 checks passed
@dkorecko dkorecko deleted the feature/support-dot branch March 27, 2026 14:16
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

Successfully merging this pull request may close these issues.

1 participant