-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
base: master
Are you sure you want to change the base?
Changes from all commits
7185f88
0a4a9e6
26375e4
0c0d51d
7616dcd
ba3a5bd
16ae279
4719f0a
efea981
4f705fd
de1fa32
11b9727
6123f3c
7f63267
8a16aea
b9dd9be
67c3123
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
title: Code Contributor Guide | ||
description: A guide for new contributors looking to contribute code to the AsyncAPI project. | ||
weight: 90 | ||
--- | ||
# AsyncAPI Onboarding Code Contributor Guide | ||
|
||
Welcome to the AsyncAPI community! We're excited to have you here. Think of AsyncAPI as a collaborative puzzle - your contributions are essential to completing it. This guide will help you get started smoothly. | ||
|
||
## Understanding AsyncAPI | ||
[AsyncAPI](https://www.asyncapi.com/en) is an open-source initiative for defining and building event-driven architectures. Our repositories house tools, specifications, and generators that make event-driven systems easier to work with. Each repo has a purpose, detailed in its `README.md`. | ||
|
||
## 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. | ||
|
||
## Contribution Etiquette | ||
1. Follow the [Code of Conduct](https://github.com/asyncapi/community/blob/master/CODE_OF_CONDUCT.md) | ||
2. Stick to the [Contributing guidelines](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) | ||
3. Document the "why" of your contribution(s). Make sure that someone who opens the code for the first time understands the changes you've made. | ||
4. Communicate openly through discussions on GitHub or designated Slack channels. | ||
|
||
### 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). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used the similar phrasing in my git-workflow PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
|
||
### 1. Creating a New Branch | ||
Always create a new branch before making changes: | ||
|
||
```bash | ||
git checkout -b my-feature-branch | ||
``` | ||
Replace `my-feature-branch` with a meaningful branch name (e.g., `fix-tests`). | ||
|
||
### 2. Make Changes | ||
Now, make the changes to the code or documentation as required. | ||
|
||
### 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: update unit tests" | ||
``` | ||
|
||
### 4. Push Your Changes | ||
Push the changes to your forked repository on GitHub: | ||
|
||
```bash | ||
git push origin my-feature-branch | ||
``` | ||
|
||
## Submitting Your First Pull Request (PR) | ||
|
||
Once you've pushed your changes, you need to create a Pull Request (PR) to propose merging your work into the official AsyncAPI repository. Make sure to use the [conventional commit style](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md#conventional-commits) while creating PRs. Next, follow these steps: | ||
|
||
### Create a Pull Request (PR) | ||
|
||
Now, go to your forked repository on GitHub (ex.- `https://github.com/your-username/generator`): | ||
|
||
1. You’ll see a notification about your recently pushed branch. Click the "Compare & pull request" button. | ||
2. Make sure the base repository is `asyncapi/generator` (upstream) and the head repository is your fork (`your-username/generator`). | ||
3. Add a clear title and description explaining your changes. | ||
4. Click "Create pull request" to submit your PR for review. | ||
|
||
That's it! You've successfully submitted your first Pull Request. | ||
|
||
### Wait for Review & Merge | ||
- The maintainers will review your PR. | ||
- If needed, respond to their comments and make changes. | ||
- Once approved, your PR will be merged into the official AsyncAPI repository! | ||
|
||
Every contribution matters, no matter how small. Dive in and let’s build something amazing together! |
There was a problem hiding this comment.
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