Skip to content

docs: add fork sync and measured PR workflow#28

Open
brawlaphant wants to merge 1 commit intoregen-network:mainfrom
brawlaphant:codex/contrib-fork-sync-playbook
Open

docs: add fork sync and measured PR workflow#28
brawlaphant wants to merge 1 commit intoregen-network:mainfrom
brawlaphant:codex/contrib-fork-sync-playbook

Conversation

@brawlaphant
Copy link

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @brawlaphant, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the project's contribution guidelines by introducing a structured workflow for contributors utilizing a fork-based development model. The added documentation aims to streamline the process of keeping local branches synchronized with the main repository and encourages the creation of small, focused pull requests for easier review and integration.

Highlights

  • New Contribution Guidelines: Added a comprehensive 'Fork Sync & Measured PR Workflow' section to the CONTRIBUTING.md file.
  • Git Workflow Instructions: Provided step-by-step Git commands for adding an upstream remote, syncing the local main branch, creating scoped branches, and rebasing before opening/updating a pull request.
  • PR Best Practices: Included recommendations for keeping pull request scope small (one concern per PR, minimal file touch, tests included) and suggested a recommended PR size of ~100-300 lines of code with one clearly stated outcome.
Changelog
  • CONTRIBUTING.md
    • Added a new section titled 'Fork Sync & Measured PR Workflow'.
    • Included detailed Git commands for managing upstream remotes, syncing main, and rebasing feature branches.
    • Provided guidelines for pull request scope, emphasizing small changes and a recommended line-of-code range.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new section to CONTRIBUTING.md detailing a Git workflow for contributors using forks. The workflow is well-structured and promotes good practices. I have a couple of suggestions to improve the clarity, consistency, and safety of the provided Git commands.

git remote add upstream https://github.com/regen-network/agentic-tokenomics.git
2. Sync local main:
git checkout main
git fetch upstream origin
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The command git fetch upstream origin fetches from both the upstream and origin remotes. For clarity and consistency with step 5 (which uses git fetch upstream), it's better to fetch only from upstream. The subsequent command git reset --hard upstream/main only requires changes from the upstream remote, making the fetch from origin unnecessary for this step.

Suggested change
git fetch upstream origin
git fetch upstream

2. Sync local main:
git checkout main
git fetch upstream origin
git reset --hard upstream/main
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The git reset --hard command is destructive as it discards any local commits on the main branch. It would be helpful to add a comment to explicitly warn contributors about this, reinforcing the idea that development work should be done on separate feature branches, not on main.

Suggested change
git reset --hard upstream/main
# WARNING: This command discards any local changes and commits on your main branch.
git reset --hard upstream/main

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.

1 participant