Skip to content
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

feat: Branching Docs #1086

Merged
merged 2 commits into from
Oct 25, 2024
Merged

feat: Branching Docs #1086

merged 2 commits into from
Oct 25, 2024

Conversation

alexrisch
Copy link
Collaborator

@alexrisch alexrisch commented Oct 24, 2024

Added Branching Docs

Summary by CodeRabbit

  • Documentation
    • Introduced a new "Release Processes" section in the README, detailing the branching strategy for code releases.
    • Added guidance on rebasing feature branches and outlined exceptions to the standard flow.

Added Branching Docs
@alexrisch alexrisch requested review from a team as code owners October 24, 2024 13:06
Copy link
Contributor

coderabbitai bot commented Oct 24, 2024

Walkthrough

The changes in the pull request introduce a new section titled "Release Processes" in the README.md file. This section outlines the branching strategy for managing code releases, detailing the roles of Main Branch, Release Branches, and Feature Branches. It includes a diagram illustrating the merge flow between these branches. Additionally, a "Rebasing Branches" section provides step-by-step instructions for rebasing feature branches onto targeted release branches, along with a section on exceptions to the standard flow.

Changes

File Change Summary
README.md Added "Release Processes" section detailing branching strategy, including Main, Release, and Feature Branches. Included a diagram of merge flow. Added "Rebasing Branches" section with instructions for rebasing feature branches. Included "Exceptions" section for scenarios deviating from standard flow.

Poem

In the garden of code, where branches grow,
New paths are laid, and knowledge flows.
With merges and rebases, we dance and play,
Building our dreams in a structured way.
So hop along, dear friends, take heed,
For in this README, we plant the seed! 🐇🌱


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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

🧹 Outside diff range and nitpick comments (4)
README.md (4)

103-108: Improve document structure and add context.

The heading hierarchy should start with h2 (##) for better document structure. Also, consider adding a brief introduction explaining the purpose of these release processes.

Apply this diff:

-### Main Branch
+## Release Processes
+
+This document outlines our branching strategy for managing code releases and maintaining a stable codebase.
+
+### Main Branch
🧰 Tools
🪛 Markdownlint

106-106: Expected: h2; Actual: h3
Heading levels should only increment by one level at a time

(MD001, heading-increment)


109-116: Improve clarity and conciseness of branch descriptions.

The branch descriptions are technically accurate but could be more concise and clearer.

Apply these improvements:

 ### Release Branches
-Each release branch is based off of `main` or the release branch before it. It is used to prepare and stabilize the code for a specific release version (e.g., `release/2.0.8`).
+Each release branch is created from `main` or the previous release branch to prepare and stabilize code for a specific version (e.g., `release/2.0.8`).

 ### Feature Branches
-Feature branches are longer-lived features or refactors expected to take additional time. They should be based off of the targeted feature release branch.
+Long-lived branches for features or refactors that branch from their targeted release branch.

-This structure allows code to flow **from `main` to release branches to feature branches**.
+This structure establishes a clear flow: `main` → release branches → feature branches.
🧰 Tools
🪛 LanguageTool

[style] ~110-~110: ‘off of’ might be wordy. Consider a shorter alternative.
Context: ...e Branches Each release branch is based off of main or the release branch before it....

(EN_WORDINESS_PREMIUM_OFF_OF)


[grammar] ~112-~112: This phrase is duplicated. You should probably use “Feature Branches” only once.
Context: ...e version (e.g., release/2.0.8). ### Feature Branches Feature branches are longer-lived features or refactors ...

(PHRASE_REPETITION)


[style] ~113-~113: ‘off of’ might be wordy. Consider a shorter alternative.
Context: ...e additional time. They should be based off of the targeted feature release branch. T...

(EN_WORDINESS_PREMIUM_OFF_OF)


117-120: Enhance diagram accessibility and context.

The merge diagram would be more useful with proper alt text and a description of what it illustrates.

Apply this diff:

-![Merge Diagram](docs/image.png)
+![Branch merge flow diagram showing the relationships between main, release, and feature branches](docs/image.png)
+
+The diagram above illustrates how changes flow through our branching strategy, from main branch through release branches and into feature branches.

139-143: Improve clarity of exceptions section.

The exceptions section could be clearer and more specific.

Apply this diff:

 ### Exceptions
-There are certain times where this flow does not work as intended. For example:
+There are certain situations when bypassing this flow is appropriate:
+
 * Build scripts: These may need to be run off of the default main branch instead of feature or release branches.
-* Read me updates: These are not required to be on a branch and can be committed directly to main.
-* Bug fixes that can be OTA updated: These can be committed directly to main to perform an OTA update.
+* Documentation updates: Changes to README and other documentation can be committed directly to main.
+* OTA-compatible bug fixes: Critical fixes that can be deployed via over-the-air updates can be committed directly to main.
🧰 Tools
🪛 LanguageTool

[style] ~140-~140: It might be better to use ‘times’ with the time-relative pronoun ‘when’. (Alternatively, use ‘in/on which’.)
Context: ... ``` ### Exceptions There are certain times where this flow does not work as intended. Fo...

(WHEN_WHERE)


[style] ~141-~141: ‘off of’ might be wordy. Consider a shorter alternative.
Context: ...Build scripts: These may need to be run off of the default main branch instead of feat...

(EN_WORDINESS_PREMIUM_OFF_OF)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9839dcf and d582131.

⛔ Files ignored due to path filters (1)
  • docs/image.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[style] ~110-~110: ‘off of’ might be wordy. Consider a shorter alternative.
Context: ...e Branches Each release branch is based off of main or the release branch before it....

(EN_WORDINESS_PREMIUM_OFF_OF)


[grammar] ~112-~112: This phrase is duplicated. You should probably use “Feature Branches” only once.
Context: ...e version (e.g., release/2.0.8). ### Feature Branches Feature branches are longer-lived features or refactors ...

(PHRASE_REPETITION)


[style] ~113-~113: ‘off of’ might be wordy. Consider a shorter alternative.
Context: ...e additional time. They should be based off of the targeted feature release branch. T...

(EN_WORDINESS_PREMIUM_OFF_OF)


[style] ~140-~140: It might be better to use ‘times’ with the time-relative pronoun ‘when’. (Alternatively, use ‘in/on which’.)
Context: ... ``` ### Exceptions There are certain times where this flow does not work as intended. Fo...

(WHEN_WHERE)


[style] ~141-~141: ‘off of’ might be wordy. Consider a shorter alternative.
Context: ...Build scripts: These may need to be run off of the default main branch instead of feat...

(EN_WORDINESS_PREMIUM_OFF_OF)

🪛 Markdownlint
README.md

106-106: Expected: h2; Actual: h3
Heading levels should only increment by one level at a time

(MD001, heading-increment)

Comment on lines +124 to +138
Assuming your branch is `feature/scw`, and your feature is targeted for release `2.1.0`, follow these steps to rebase:

1. First, checkout the feature branch:
```bash
git fetch origin
git branch feature/scw -D
git checkout feature/scw origin/feature/scw
```

2. Then, rebase onto the targeted release branch:
```bash
git pull origin/release/2.1.0 --rebase
git push origin feature/scw --force-with-lease
```

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix git commands and improve rebase instructions.

There are several technical issues in the git commands that need to be addressed:

  1. The git pull command syntax is incorrect
  2. The branch deletion step might be confusing
  3. Instructions are too specific to one example

Apply these corrections:

-Assuming your branch is `feature/scw`, and your feature is targeted for release `2.1.0`, follow these steps to rebase:
+To rebase your feature branch onto a release branch, follow these steps:

 1. First, checkout the feature branch:
    ```bash
    git fetch origin
-   git branch feature/scw -D
-   git checkout feature/scw origin/feature/scw
+   git checkout -B feature/<your-branch> origin/feature/<your-branch>
    ```

 2. Then, rebase onto the targeted release branch:
    ```bash
-   git pull origin/release/2.1.0 --rebase
-   git push origin feature/scw --force-with-lease
+   git rebase origin/release/<version>
+   git push origin feature/<your-branch> --force-with-lease
    ```

README.md Show resolved Hide resolved
@alexrisch alexrisch merged commit 9f20cef into main Oct 25, 2024
1 check passed
@alexrisch alexrisch deleted the ar/feat-release-docs branch October 25, 2024 17:32
@coderabbitai coderabbitai bot mentioned this pull request Nov 22, 2024
technoplato pushed a commit that referenced this pull request Dec 17, 2024
Added Branching Docs
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.

2 participants