Skip to content

Conversation

@Avish34
Copy link
Contributor

@Avish34 Avish34 commented Nov 29, 2025

This PR aims to fix #743 (comment)

Motivation and Context

This is needed to ensure we are sanitizing the URL before creating server.json to be inline with the validations.

How Has This Been Tested?

Tested via UTs and also tested CLI locally to ensure the expected behavior.

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@Avish34 Avish34 force-pushed the fix-issue-743 branch 5 times, most recently from 2e4a9ce to 5118c3b Compare November 29, 2025 11:54
@Avish34
Copy link
Contributor Author

Avish34 commented Nov 29, 2025

@tadasant @domdomegg Please review!!

@tadasant
Copy link
Member

@claude please review this PR

@claude
Copy link
Contributor

claude bot commented Nov 29, 2025

Claude encountered an error —— View job

Failed with exit code 128

I'll analyze this and get back to you.

Copy link
Member

@tadasant tadasant left a comment

Choose a reason for hiding this comment

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

I'm not sure introducing a utils pattern is necessary here. Can we just add it to the current flow in detectRepoURL?

Copy link
Member

Choose a reason for hiding this comment

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

Unintentional .exe commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, silly of me,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tadasant Pushed the changes, please review.

@Avish34
Copy link
Contributor Author

Avish34 commented Nov 30, 2025

I'm not sure introducing a utils pattern is necessary here. Can we just add it to the current flow in detectRepoURL?

sure!!

@Avish34 Avish34 force-pushed the fix-issue-743 branch 2 times, most recently from 543d864 to cc55e8d Compare November 30, 2025 17:53
}

func detectRepoURL() string {
func detectRepoURL(packageType string) string {
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to pipe around packageType here? Couldn't we just "strip git+ from the prefix if it exists" regardless of the packageType and keep this change fairly minimal? Or is there some case you're imagining where we'd want git+ as a prefix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I was just thinking that if someday going forward a case arises for a different package manager where we need to do some changes to repoURL generated by them. In that case, the changes will be minimal a that time. I'm happy to remove the packageType params if you think it won't be much helpful right now. Happy to address the comments, let me know your thoughts.

Copy link
Member

Choose a reason for hiding this comment

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

I'd rather we do the simpler change now and do the bigger change later if the need arises (I'm not sure it definitely will). Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done @tadasant , please review.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unrelated failure in sanity, good to merge.

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.

mcp-publisher init does not strip git+ from repository URL

2 participants