Skip to content

docs: add CONTRIBUTING.md #275

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

Merged
merged 1 commit into from
May 12, 2025

Conversation

pottekkat
Copy link
Collaborator

@pottekkat pottekkat commented May 12, 2025

Moves the contributing guide in the readme to a new CONTRIBUTING.md file and reorganize it a bit.

This is an initial version and soon we need to also add about testing with your own fork on an external project (using replace) and about the examples etc. It needs some changes around the examples as well so it can be updated later. Now, let's just move it to a separate file and have a practical structure for it so that others can also add to it.

Summary by CodeRabbit

  • Documentation
    • Added a dedicated contributor guide outlining development setup and contribution workflow.
    • Removed the "Contributing" section from the main README to avoid duplication.

Copy link
Contributor

coderabbitai bot commented May 12, 2025

Walkthrough

A new CONTRIBUTING.md file was added to provide contributor guidelines, including development setup and workflow instructions. Simultaneously, the "Contributing" section was removed from the README.md file, relocating all development and contribution guidance to the new dedicated documentation file.

Changes

Files Change Summary
CONTRIBUTING.md Added a new file detailing contributor guidelines, development prerequisites, setup, workflow, and support channels.
README.md Removed the entire "Contributing" section, including all developer setup and workflow instructions.

Suggested labels

documentation

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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

🧹 Nitpick comments (4)
CONTRIBUTING.md (4)

1-4: Clarify project context in document title
Consider specifying the project name in the main heading for clarity (especially if this file is viewed outside the repo). For example:

- # Contributing
+ # Contributing to the MCP Go SDK

8-14: Refine prerequisite instruction for clarity
The phrasing “Make sure you have Go 1.23 or later installed on your machine” can be more direct. For example:

- Make sure you have Go 1.23 or later installed on your machine. You can check your Go version by running:
+ Ensure Go 1.23 or later is installed on your machine by running:
🧰 Tools
🪛 LanguageTool

[grammar] ~9-~9: It appears that the past participle should be used here.
Context: ... ### Prerequisites Make sure you have Go 1.23 or later installed on your machine...

(HAVE_PART_AGREEMENT)


30-39: Encourage descriptive commits and formatting
Consider adding a guideline around commit messages and code style. For example, after “Make your changes.”:

- 2. Make your changes.
+ 2. Make your changes.
+    - Write clear, descriptive commit messages.
+    - Run `go fmt ./...` and any project-specific linters before committing.

42-42: Fix missing comma in closing sentence
Insert a comma before “either” for proper punctuation:

- Feel free to reach out if you have any questions or need help either by [opening an issue](https://github.com/mark3labs/mcp-go/issues) or by reaching out in the [Discord channel](https://discord.gg/RqSS2NQVsY).
+ Feel free to reach out if you have any questions or need help, either by [opening an issue](https://github.com/mark3labs/mcp-go/issues) or by reaching out in the [Discord channel](https://discord.gg/RqSS2NQVsY).
🧰 Tools
🪛 LanguageTool

[uncategorized] ~42-~42: Possible missing comma found.
Context: ...h out if you have any questions or need help either by [opening an issue](https://gi...

(AI_HYDRA_LEO_MISSING_COMMA)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5121b3 and a0de484.

📒 Files selected for processing (2)
  • CONTRIBUTING.md (1 hunks)
  • README.md (0 hunks)
💤 Files with no reviewable changes (1)
  • README.md
🧰 Additional context used
🪛 LanguageTool
CONTRIBUTING.md

[grammar] ~9-~9: It appears that the past participle should be used here.
Context: ... ### Prerequisites Make sure you have Go 1.23 or later installed on your machine...

(HAVE_PART_AGREEMENT)


[style] ~41-~41: Consider using a less common alternative to make your writing sound more unique and professional.
Context: ...mit a pull request to the main branch. Feel free to reach out if you have any questions or ...

(FEEL_FREE_TO_STYLE_ME)


[uncategorized] ~42-~42: Possible missing comma found.
Context: ...h out if you have any questions or need help either by [opening an issue](https://gi...

(AI_HYDRA_LEO_MISSING_COMMA)

Comment on lines +17 to +23
1. Fork the repository
2. Clone your fork:

```bash
git clone https://github.com/YOUR_USERNAME/mcp-go.git
cd mcp-go
```
Copy link
Contributor

@coderabbitai coderabbitai bot May 12, 2025

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add a step to configure the upstream remote
We should guide contributors to keep their fork in sync with the main repo. Suggest inserting after cloning:

3. Clone your fork:
   ```bash
   git clone https://github.com/YOUR_USERNAME/mcp-go.git
   cd mcp-go

<!-- This is an auto-generated reply by CodeRabbit -->

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ya, good idea (though I personally prefer using gh CLI for this)

Copy link
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

🌐 Web query:

What are the GitHub CLI (gh) commands for adding upstream remote and keeping a fork in sync?

💡 Result:

Adding an Upstream Remote to a Fork

To keep your fork in sync with the original repository ("upstream"), you first need to set up a remote pointing to the upstream repository. You can do this via git or the GitHub CLI.

Using Git:

git remote add upstream https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git

Verify setup:

git remote -v

You should see both origin (your fork) and upstream (original repo) listed[1][7][9].

Using GitHub CLI (gh):
When you fork a repository using gh, you can also automatically set up the upstream remote:

gh repo fork REPOSITORY --remote=true

This will add the upstream remote in one step[9][3].

Keeping a Fork in Sync

There are two main ways to sync your fork with the upstream repository using GitHub CLI.

1. Using gh repo sync (GitHub CLI Recommended)

To update your fork’s branch (e.g., main) with the upstream’s changes:

gh repo sync owner/cli-fork -b main
  • Replace owner/cli-fork with your fork’s identifier.
  • Replace main with your default or target branch.
  • Use the --force flag if there are conflicts and you want to overwrite your branch[10].

2. Using Raw Git Commands

This is a manual alternative, useful if you want more granular control:

  1. Fetch the upstream changes:
    git fetch upstream
  2. Check out your local main branch:
    git checkout main
  3. Merge upstream changes:
    git merge upstream/main
  4. Push the update to your fork:
    git push origin main

This keeps your fork's main branch up-to-date with the original repository[7][6][10].

Summary Table

Task GitHub CLI (gh) Command Git Command
Fork and add upstream remote gh repo fork REPOSITORY --remote=true git remote add upstream <upstream-url>
Sync fork branch with upstream (CLI) gh repo sync owner/fork-repo -b main N/A
Fetch and merge upstream into local N/A git fetch upstream
git merge upstream/main
Push changes to your fork N/A git push origin main

Best Practices

  • After syncing, push your updated branch to your fork’s origin to keep GitHub in sync[7][6].
  • Always resolve any merge conflicts that arise before pushing.

These commands allow you to efficiently add an upstream remote and keep your fork synchronized with the original repository using both GitHub CLI and traditional git methods[1][3][10].

Citations:


@robert-jackson-glean Thanks for the feedback! You're right - GitHub CLI is a great alternative. Let's include both options to accommodate different preferences:

3. Clone your fork:
   ```bash
   git clone https://github.com/YOUR_USERNAME/mcp-go.git
   cd mcp-go
    1. Add the upstream remote (choose one method):
  • Using standard git:
  • git remote add upstream https://github.com/mark3labs/mcp-go.git
  • OR using GitHub CLI:
  • gh repo set-default mark3labs/mcp-go
    1. Install the required packages:
    go mod tidy

This way, contributors can use whichever method they're most comfortable with.

---

<details>
<summary>✏️ Learnings added</summary>

Learnt from: robert-jackson-glean
PR: #275
File: CONTRIBUTING.md:17-23
Timestamp: 2025-05-12T15:59:13.092Z
Learning: For CONTRIBUTING.md documentation, include both standard git commands and GitHub CLI (gh) alternatives when describing repository setup steps to accommodate different user preferences.


> Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure [review instructions](https://docs.coderabbit.ai/guides/review-instructions). You can manage existing learnings in the [app](https://app.coderabbit.ai/learnings).

</details>




<!-- <agentComponentType>chat-answer</agentComponentType> -->

<!-- <rawResChunk><answer><details>
<summary>🧩 Analysis chain</summary>

🌐 Web query:

```web
What are the GitHub CLI (gh) commands for adding upstream remote and keeping a fork in sync?

💡 Result:

Adding an Upstream Remote to a Fork

To keep your fork in sync with the original repository ("upstream"), you first need to set up a remote pointing to the upstream repository. You can do this via git or the GitHub CLI.

Using Git:

git remote add upstream https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git

Verify setup:

git remote -v

You should see both origin (your fork) and upstream (original repo) listed[1][7][9].

Using GitHub CLI (gh):
When you fork a repository using gh, you can also automatically set up the upstream remote:

gh repo fork REPOSITORY --remote=true

This will add the upstream remote in one step[9][3].

Keeping a Fork in Sync

There are two main ways to sync your fork with the upstream repository using GitHub CLI.

1. Using gh repo sync (GitHub CLI Recommended)

To update your fork’s branch (e.g., main) with the upstream’s changes:

gh repo sync owner/cli-fork -b main
  • Replace owner/cli-fork with your fork’s identifier.
  • Replace main with your default or target branch.
  • Use the --force flag if there are conflicts and you want to overwrite your branch[10].

2. Using Raw Git Commands

This is a manual alternative, useful if you want more granular control:

  1. Fetch the upstream changes:
    git fetch upstream
  2. Check out your local main branch:
    git checkout main
  3. Merge upstream changes:
    git merge upstream/main
  4. Push the update to your fork:
    git push origin main

This keeps your fork's main branch up-to-date with the original repository[7][6][10].

Summary Table

Task GitHub CLI (gh) Command Git Command
Fork and add upstream remote gh repo fork REPOSITORY --remote=true git remote add upstream <upstream-url>
Sync fork branch with upstream (CLI) gh repo sync owner/fork-repo -b main N/A
Fetch and merge upstream into local N/A git fetch upstream
git merge upstream/main
Push changes to your fork N/A git push origin main

Best Practices

  • After syncing, push your updated branch to your fork’s origin to keep GitHub in sync[7][6].
  • Always resolve any merge conflicts that arise before pushing.

These commands allow you to efficiently add an upstream remote and keep your fork synchronized with the original repository using both GitHub CLI and traditional git methods[1][3][10].

Citations:


@robert-jackson-glean Thanks for the feedback! You're right - GitHub CLI is a great alternative. Let's include both options to accommodate different preferences:

3. Clone your fork:
   ```bash
   git clone https://github.com/YOUR_USERNAME/mcp-go.git
   cd mcp-go
    1. Add the upstream remote (choose one method):
  • Using standard git:
  • git remote add upstream https://github.com/mark3labs/mcp-go.git
  • OR using GitHub CLI:
  • gh repo set-default mark3labs/mcp-go
    1. Install the required packages:
    go mod tidy

This way, contributors can use whichever method they're most comfortable with.

---

<details>
<summary>✏️ Learnings added</summary>

Learnt from: robert-jackson-glean
PR: #275
File: CONTRIBUTING.md:17-23
Timestamp: 2025-05-12T15:59:13.092Z
Learning: For CONTRIBUTING.md documentation, include both standard git commands and GitHub CLI (gh) alternatives when describing repository setup steps to accommodate different user preferences.


> Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure [review instructions](https://docs.coderabbit.ai/guides/review-instructions). You can manage existing learnings in the [app](https://app.coderabbit.ai/learnings).

</details>

</answer></rawResChunk> -->

<!-- This is an auto-generated reply by CodeRabbit -->

Comment on lines +17 to +23
1. Fork the repository
2. Clone your fork:

```bash
git clone https://github.com/YOUR_USERNAME/mcp-go.git
cd mcp-go
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ya, good idea (though I personally prefer using gh CLI for this)

@rwjblue-glean rwjblue-glean merged commit 35f8a89 into mark3labs:main May 12, 2025
3 checks passed
@rwjblue-glean rwjblue-glean added the type: documentation Improvements or additions to documentation label May 12, 2025
@pottekkat pottekkat deleted the docs/contributor-guide/1 branch May 12, 2025 16:31
@coderabbitai coderabbitai bot mentioned this pull request May 13, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy