Skip to content

docs: make steps in git workflow more beginner-friendly #1772

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 6 commits into from
Mar 31, 2025

Conversation

bandantonio
Copy link
Contributor

Description
When expanding our Community documentation (#1622) we came across the situation that multiple documents (#1725, #1730) describe git workflow as a prerequisite to start contributing to community repos.

It was decided to update the workflow document with more user-friendly instructions and link back to this document while removing redundant sections from other documents that mention git workflow in any context.

Related issue(s)
See also #1622 #1725 #1730

@thulieblack
Copy link
Member

@derberg can you help review, if we missed a step

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

left some suggestions

I love you how change approach to have one code snippet with command and examples/output - reads better

git-workflow.md Outdated

Each contributor and maintainer in AsyncAPI must follow this workflow:
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 original repository (a so-called `upstream`), and then create one or more pull requests (PRs) to incorporate changes from the `origin` to `upstream`. This unified workflow allows both members and external contributors to contribute through the same process, keeping the main repository branches clean.
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
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 original repository (a so-called `upstream`), and then create one or more pull requests (PRs) to incorporate changes from the `origin` to `upstream`. This unified workflow allows both members and external contributors to contribute through the same process, keeping the main repository branches clean.
AsyncAPI uses a fork model for all community members, including maintainers. In this model, you push changes to your own working copy (a fork, a so-called `origin`) of the original repository (a so-called `upstream`), and then create one or more pull requests (PRs) to incorporate changes from the `origin` to `upstream`. This unified workflow allows both members and external contributors to contribute through the same process, keeping the main repository branches clean.

Copy link
Member

Choose a reason for hiding this comment

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

(a fork, a so-called origin)

you need to change it somehow - it sounds like origin is the same as fork but it is not

origin is the remote version of repo - opposing the local copy (clone)

so upstream, if somebody clones (asyncapi bot) the upstream, it operates on local version, on clone - and pushes it to origin, in this case upsteam is origin

so fork = origin && upstream = origin

git-workflow.md Outdated
Comment on lines 91 to 97
```bash
# Command
git fetch upstream BRANCH-NAME

# Example
git fetch upstream master
```
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
```bash
# Command
git fetch upstream BRANCH-NAME
# Example
git fetch upstream master
```
```bash
# Command
git fetch upstream master
```

in our case it will always be master - because of ci/cd complex setup, we are not able to enable main

git-workflow.md Outdated

In case you are a contributor who suggests minor changes using GitHub UI, it is recommended to use a [Pull bot](https://probot.github.io/apps/pull). This bot keeps your fork up to date by creating and merging a pull request with latest changes into the `master `branch of your fork.
For minor changes via GitHub UI, use a [Pull bot](https://probot.github.io/apps/pull) to keep your fork up to date.
Copy link
Member

Choose a reason for hiding this comment

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

so many years after writing this first version of the document, not sure we should recommend pullbot

now there is a native functionality in GH, that allows you to update your fork with upstream with one click

I stopped using pull bot few years back 😄

git-workflow.md Outdated

4. Create a pull request from the branch of your forked repository to the `master` branch of the upstream repository and wait for the maintainers' review.
4. Create a pull request from your branch of the `origin` repository to the `master` branch of the `upstream` repository and await review.
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
4. Create a pull request from your branch of the `origin` repository to the `master` branch of the `upstream` repository and await review.
4. Create a pull request from your branch of the fork repository to the `master` branch of the `upstream` repository and await review.

git-workflow.md Outdated
git remote add upstream https://github.com/{original-owner}/{original-repository}.git
```
See the example:
2. Add the `upstream` repository:
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
2. Add the `upstream` repository:
2. Add the `upstream` repository. In other words, point to main project located in AsyncAPI GitHub organization:

Copy link
Member

@thulieblack thulieblack left a comment

Choose a reason for hiding this comment

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

LGTM

@thulieblack
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit 365eff4 into asyncapi:master Mar 31, 2025
8 checks passed
@bandantonio bandantonio deleted the docs/git-workflow-revise branch March 31, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants