Skip to content

docs: add onboarding code contributor guide #1725

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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

SaxenaAnushka102
Copy link
Contributor

@SaxenaAnushka102 SaxenaAnushka102 commented Feb 16, 2025

Description

PR related to First project: Onboarding Contributor Guides
Added the Onboarding Code Contributor Guide
Related issue(s)
#1622

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive onboarding guide for new code contributors, outlining essential tools, best practices, workflow steps, and the pull request process.

## Tools You’ll Need
- **Git and GitHub**: Your tools for collaboration. Get familiar with forking, branching, and pull requests.
- **Code Editor**: Your favourite IDEs like VS Code.
- **Node.js & NPM**: AsyncAPI relies on JavaScript, so ensure these are installed and configured.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **Node.js & NPM**: AsyncAPI relies on JavaScript, so ensure these are installed and configured.
- **Node.js and npm**: AsyncAPI relies on JavaScript/TypeScript, so ensure these are installed and configured.


## Starting Small
- Look for `good first issue` or `help wanted` labels in the repository. These are beginner-friendly issues to get you started.
- Join our [Slack workspace](https://t.co/YbJQ4ghX7Q) for help and to connect with the community.
Copy link
Contributor

Choose a reason for hiding this comment

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

@thulieblack just a thought: I remember one of our Mentorship meetings, where you said that dedicated Slack channels act as your target audience, mentors, tutors, so you should use them to get as much feedback as possible and don't be afraid to ask questions, as someone said "The only stupid question is the one that is not asked".
I think it's worth adding this info to slack-etiquette because I bet that "what and how to ask in channels" is a common stumbling stone for newcomers.

Comment on lines 35 to 36
- Your **fork** is the `origin`.
- The official AsyncAPI repository is the `upstream`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be deleted

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!

# [email protected]:asyncapi/generator.git

git remote add upstream <upstream git repo>
git remote set-url --push upstream no_push
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure that this step is required? If I'm not mistaken, regular contributors will receive the standard Permission denied error when trying to push to upstream directly.

Comment on lines 51 to 54
### Verify with:
```bash
git remote -v
```
Copy link
Contributor

Choose a reason for hiding this comment

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

You showed an example above, so I think it would be useful for newcomers to see example output of this command as well. Or even better, show output of git remote -v before adding upstream, and after.

Verify that upstream has been set:

git remote -v

Example output:

origin  https://github.com/<username>/generator.git (fetch)
origin  https://github.com/<username>/generator.git (push)
upstream        [email protected]:asyncapi/generator.git (fetch)
upstream        [email protected]:asyncapi/generator.git (push)

```

### Keeping Your Fork in Sync
Before starting new work, sync your fork with the upstream:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Before starting new work, sync your fork with the upstream:
Before starting new work, sync your `origin` with the `upstream`:

git checkout -b myfeature
```

## Submitting Your First Pull Request
Copy link
Contributor

Choose a reason for hiding this comment

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

This section tells nothing about how to actually submit a pull request from origin to upstream

@thulieblack
Copy link
Member

@SaxenaAnushka102 any update here

@SaxenaAnushka102
Copy link
Contributor Author

SaxenaAnushka102 commented Mar 16, 2025

@SaxenaAnushka102 any update here

Hi @thulieblack @bandantonio ! I've incorporated the suggested changes in the latest commit. Please have a look and let me know your thoughts on this, thanks!


---
- **Code Editor**: Your tool to work with the source code of our repositories and version control. For example, VS Code, Sublime Text, JetBrains IDEs, or any other tool you prefer.
- **Node.js & NPM**: AsyncAPI relies on JavaScript/Typescript, so ensure these are installed and configured.
Copy link
Contributor

Choose a reason for hiding this comment

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

```
Replace `my-feature-branch` with a meaningful branch name (e.g., `fix-tests`).

### **2. Make Changes and Commit**
Copy link
Contributor

Choose a reason for hiding this comment

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

I would split this step into three because all of them are logically separate operations:

  1. Make changes
  2. Commit
  3. Push


## Submitting Your First Pull Request (PR)

Once you've made changes to your forked repository, you need to submit a **Pull Request (PR)** to propose merging your work into the official AsyncAPI repository. Follow these steps:
Copy link
Contributor

Choose a reason for hiding this comment

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

The section is logically incoherent.

Once you've made changes to your forked repository, you need to submit a Pull Request (PR)

You cannot submit a PR at this point, because you haven't pushed the changes to the repo yet.

The push step must be a part of the previous section as the logical conclusion of working with changes locally.
The "creating a PR" part is continuation of the process when you're most likely working with GitHub UI to create it, so the additional back and forth step of going back to your IDE in order to push the changes is irrelevant here, as it adds unnecessary noise and looks confusing.


---
## Contribution Strategy
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this section as we agreed not to duplicate these instructions to keep the git-workflow (PR #1772) a single source of truth.


### Making Code Changes

AsyncAPI uses a fork model to allow contributions to the organization's repositories. In this model, you push changes to your own working copy (a fork, a so-called `origin`) of the official repository (a so-called `upstream`), and then create a pull request (PR) to incorporate changes from the `origin` to `upstream`. For detailed steps, refer to our [Git Workflow Guide](https://github.com/asyncapi/community/blob/master/git-workflow.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

I used the similar phrasing in my git-workflow PR.
I would suggest rephrasing (or better removing) this intro (to avoid duplication and potential confusion and misunderstanding among new contributors) and link to the corresponding section of the git-workflow file.

Copy link
Contributor Author

@SaxenaAnushka102 SaxenaAnushka102 Mar 28, 2025

Choose a reason for hiding this comment

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

Alright, got your point. Sorry for the confusion on the same thing again. Shall we remove the whole paragraph or omit the section to directly start from the steps (creating a new branch being the first)? My thought behind adding the link was to point the new contributors to the ideal git-workflow and explain how they can actually make changes to code.

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about creating the "Prerequisites" section and adding links to Git workflow and Recommended tools documents there? Because the "Tools You’ll Need" section 100% overlaps with the #1777 PR. Again, it's better to have a single place where you describe things rather than being forced to update a myriad of documents once something changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, there's multiple repetition of same points but in the prerequisites the code contributor should again have knowledge of git, have code editor and so on. To resolve this redundancy issue, shall we directly put link to recommended tools and git workflow here?

Copy link
Contributor

Choose a reason for hiding this comment

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

@SaxenaAnushka102 Didn't quite catch your idea. I believe, if we add a new section called "Prerequisites" after "Understanding AsyncAPI" that would contain links to the updated git workflow and recommended tools based on #1777 PR, we will have no redundancy (you will need to remove the "Making Code Changes" section as well). Does this answer your question?


AsyncAPI uses a fork model to allow contributions to the organization's repositories. In this model, you push changes to your own working copy (a fork, a so-called `origin`) of the official repository (a so-called `upstream`), and then create a pull request (PR) to incorporate changes from the `origin` to `upstream`. For detailed steps, refer to our [Git Workflow Guide](https://github.com/asyncapi/community/blob/master/git-workflow.md).

### **1. Creating a New Branch**
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove all the bold headings as they are not supported on the website. Something we had to fix yesterday in #1832 after @Aahil13 spotted it.

@@ -0,0 +1,80 @@
---
title: Code Contributor Guide
Copy link
Member

Choose a reason for hiding this comment

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

Add a description to your page

## Tools You’ll Need
- Git and GitHub: Your tools for collaboration. Get familiar with forking, branching, and pull requests.
- Code Editor: Your tool to work with the source code of our repositories and version control. For example, VS Code, Sublime Text, JetBrains IDEs, or any other tool you prefer.
- Node.js & npm: AsyncAPI relies on JavaScript/Typescript, so ensure these are installed and configured.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Node.js & npm: AsyncAPI relies on JavaScript/Typescript, so ensure these are installed and configured.
- Node.js & npm: AsyncAPI relies on JavaScript/TypeScript, so ensure these are installed and configured.

Copy link

coderabbitai bot commented Apr 18, 2025

Walkthrough

A new documentation file, "Code Contributor Guide," has been added to the onboarding section. This guide provides step-by-step instructions for new contributors to the AsyncAPI project, covering the tools required, contribution etiquette, the fork-and-branch workflow, pull request procedures, and the review and merge process. The document is structured to help new contributors understand the process of contributing code, including example commands and guidance on communication and documentation standards.

Changes

File(s) Change Summary
docs/onboarding-guide/code-contributor-guide.md Added a new onboarding guide for code contributors, detailing contribution workflow, etiquette, and PR process.

Suggested labels

ready-to-merge

Suggested reviewers

  • thulieblack
  • bandantonio

Poem

🐇
New guide on the docs, a welcome mat unfurled,
For coders hopping in from all around the world.
With branches and forks, and etiquette too,
This roadmap for rabbits shows just what to do.
So hop on, contribute, let your changes be heard—
Together we build, one commit, one word!
🌱

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

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.

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

@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

🔭 Outside diff range comments (1)
docs/onboarding-guide/code-contributor-guide.md (1)

81-82: ⚠️ Potential issue

Remove stray line number or extra whitespace
Line 82 appears to be a stray number without content. Please remove it or confirm if it's an unintended artifact.

♻️ Duplicate comments (3)
docs/onboarding-guide/code-contributor-guide.md (3)

18-23: Augment communication etiquette with Slack guidelines
Great coverage of contribution etiquette—consider adding a reference to the Slack Etiquette guide to help newcomers ask questions effectively in community channels.


13-17: 🛠️ Refactor suggestion

Avoid duplication; link to central 'Recommended Tools' guide
The list of required tools overlaps with the Recommended Tools document. Consider replacing this section with a brief note and a link to keep tooling instructions in a single source of truth.


24-27: 🛠️ Refactor suggestion

Reorganize workflow introduction into 'Prerequisites'
To streamline onboarding, introduce a "Prerequisites" section after "Understanding AsyncAPI" linking to both the Git Workflow and Recommended Tools guides. Then rename or remove the "Making Code Changes" paragraph to reduce redundancy.

🧹 Nitpick comments (6)
docs/onboarding-guide/code-contributor-guide.md (6)

1-5: Verify frontmatter consistency and metadata
Ensure title, description, and weight align with other onboarding guides for consistent ordering and display. Consider adding a sidebar_label or slug if the autogenerated sidebar label needs customization.


6-9: Refine introduction and trailing whitespace
Remove excessive trailing spaces on line 8 and ensure a single blank line before the next heading. Consider tightening the welcome message or simplifying the analogy for clarity.


10-12: Enhance clarity of 'Understanding AsyncAPI' description
Rephrase "Each repo has a purpose, detailed in its README.md." to "Each repository contains tools and details in its README.md." for improved readability.

🧰 Tools
🪛 LanguageTool

[duplication] ~10-~10: Possible typo: you repeated a word.
Context: ...t started smoothly. ## Understanding AsyncAPI AsyncAPI is an ope...

(ENGLISH_WORD_REPEAT_RULE)


28-33: Clarify branch naming conventions
Consider adding guidance on branch naming schemes (e.g., feat/<scope>-<description> or fix/<issue-number>-<description>) to align with Conventional Commits and repository standards.


61-64: Use consistent imperative tone
For alignment with UI copy standards, consider rewriting to an imperative voice, e.g., "Create your first Pull Request" rather than "Once you've pushed your changes, you need to create...".


65-73: Generalize repository placeholders
Replace hardcoded generator in the URL example with a placeholder like <repository> so that contributors can adapt this to any AsyncAPI repo (e.g., generator, parser, etc.).

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8be4c0a and 8a16aea.

📒 Files selected for processing (1)
  • docs/onboarding-guide/code-contributor-guide.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/onboarding-guide/code-contributor-guide.md

[duplication] ~10-~10: Possible typo: you repeated a word.
Context: ...t started smoothly. ## Understanding AsyncAPI AsyncAPI is an ope...

(ENGLISH_WORD_REPEAT_RULE)

🔇 Additional comments (3)
docs/onboarding-guide/code-contributor-guide.md (3)

36-38: Step is clear and concise
This instruction to make changes is straightforward and easy to follow.


54-59: Push step is correctly described
The instructions to push changes to the origin branch are complete and clear.


76-80: Approve final steps and encouragement
The review & merge process and closing encouragement are well written and motivating for new contributors.

Comment on lines +39 to +52
### 3. Commit Your Changes

Check what files you modified:
```bash
git status
```
Stage the changes:
```bash
git add .
```
Commit your changes with a meaningful message:
```bash
git commit -m "Fix unit tests"
```
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Align commit message example with Conventional Commits
The sample commit "Fix unit tests" should follow the Conventional Commits format, e.g., chore(tests): fix unit tests or fix: update unit tests, to reinforce best practices.

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.

4 participants