Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

set user agent for client requests#61

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mntlty merged 1 commit intomainfromadd_user_agent
Apr 1, 2025
Merged

Conversation

mntlty
Copy link
Collaborator

Set a User-Agent "github-mcp-server/1.0" for Client requests.

This overrideshttps://github.com/google/go-github/blob/0710d0b66118875dd853e35fdbeadf32f0264376/github/github.go#L36 and is set inhttps://github.com/google/go-github/blob/0710d0b66118875dd853e35fdbeadf32f0264376/github/github.go#L423

I wish there was a way to dynamically set the version, but I don't know of a sane way to pull the GitHub release version so starting with 1.0

With this being built directly in the command I don't have a good way to write a test in code, a future refactor could help with that.

@CopilotCopilotAI review requested due to automatic review settingsApril 1, 2025 14:39
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR sets a custom User-Agent for GitHub client requests in the github-mcp-server application.

  • Adds a hard-coded User-Agent ("github-mcp-server/1.0") to override the default from the go-github library.
  • Prepares groundwork for potential future refactoring to dynamically set the version.
Comments suppressed due to low confidence (1)

cmd/github-mcp-server/main.go:104

  • [nitpick] Consider defining a constant for the User-Agent string to centralize the version value and simplify future updates.
ghClient.UserAgent = "github-mcp-server/1.0"

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused.Learn more

Copy link
Collaborator

@SamMorrowDrumsSamMorrowDrums left a comment

Choose a reason for hiding this comment

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

Thank you so much! I'll revisit the version once the SEMVER stuff is sorted.

@mntltymntlty merged commit84ec566 intomainApr 1, 2025
14 checks passed
@mntltymntlty deleted the add_user_agent branchApril 1, 2025 15:54
manian0430 pushed a commit to ChrisLally/github-mcp-server that referenced this pull requestApr 12, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@SamMorrowDrumsSamMorrowDrumsSamMorrowDrums approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mntlty@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp