Skip to content

Latest commit

 

History

History
140 lines (85 loc) · 6.69 KB

CONTRIBUTING.md

File metadata and controls

140 lines (85 loc) · 6.69 KB

Contributing to Blockchain Developer Bootcamp

Background

To lower the barriers to entry, all of our course content is in Markdown located in the docs directory. We then use mkdocs to generate the course pages (thank you Kevin Bluer!).

Markdown is what this file and GitHub README.md files are written in. If you need some help with Markdown, please see this Markdown cheatsheet.. One note, to make sure links open in a new window, be sure to add {target=_blank} at the end of a link. It will look like this:

[Text being linked](www.linkaddresshere.com){target=_blank}

Steps to GitHub PRs

See a video walking through the steps below here

For hot fixes, like typos, broken links or recommendations, please use the following steps:

  1. Please name your branch fix/[THING YOU FIXED HERE]
  2. In the subject line of your Pull Request, start with the lesson you're targeting in brackets. For example: [S01-fundamentals/M2-consensus/L5-trustless-consensus] Fixes typo in Line #87 This will help other folks who have a similar issue see if there's already something open.
  3. Please target your PR against the staging branch rather than main. Every few days we'll do a merge from staging into main.

Fixing Conflicts

If there have been updates to the staging branch since you forked it for your PR, your branch may have a conflict. Doing the following will help with some (not all!) conflicts:

  1. In the local version of the branch you're using as your PR, run git remote add upstream https://github.com/ConsenSys-Academy/Blockchain-Developer-Bootcamp/tree/staging
  2. Grab the recent changes by running git fetch upstream
  3. Merge the recent changes with your branch by running git merge upstream/YOUR_BRANCH_NAME_HERE
  4. Push the resolved codebase back to the GitHub version of your branch with git push origin YOUR_BRANCH_NAME_HERE

Learn more on how to use branches 🌳.

Please check that your PR doesn't have a conflict! If it does, please:

  1. On your local machine, add the staging repo as your upstream branch using git remote add upstream https://github.com/ConsenSys-Academy/Blockchain-Developer-Bootcamp/tree/staging
  2. Run git fetch upstream
  3. Run git merge upstream/[YOUR BRANCH NAME HERE]
  4. Then git push origin [YOUR BRANCH NAME HERE]

Coordination

We use GitHub issues for our issue tracking and project management.

Overview

We use the Forking Workflow method of open source contribution. This method allows projects to scale well with not alot of complexity.

Setup

See the primer on setting up repos.

  1. Fork the ConsenSys-Academy/Blockchain-Developer-Bootcamp repository.

  2. Clone the forked repository from your GitHub profile to your desktop.

  3. Add the remote repositories for origin and upstream.

Learn more about working with forks 🍴.

Contributing Code

Issues

Open a issue. Issues are good! They are used to point out errors and suggest new features.

Picking up an Issue

Read the issue. Ask any questions in the issue thread. Mention the issue that you'd like to work on this to avoid double work.

Staying Up To Date

Before starting on work on the issue, make sure your code is up to date.

  1. In the local version of the branch you're using as your PR, run git remote add upstream https://github.com/ConsenSys-Academy/Blockchain-Developer-Bootcamp/tree/staging
  2. Grab the recent changes by running git fetch upstream
  3. Merge the recent changes with your branch by running git merge upstream/YOUR_BRANCH_NAME_HERE
  4. Push the resolved codebase back to the GitHub version of your branch with git push origin YOUR_BRANCH_NAME_HERE

Learn more on how to use branches 🌳.

Creating a contribution

  1. Check for the latest code and update.
  2. Branch off of dev.
  3. Name your branch based on intent. See the style guide below.
  4. Write code.
  5. Commit code. See style guide.
  6. Push the branch to origin.
  7. Open a pull request against staging with the branch. Please note, this is not main but staging to help us save on GitHub Action minutes, we're doing our best to batch-committ changes.

Style Guide

To keep our commit history clean, we follow these simple rules.

Naming Git Branches

Types of branches:

  1. main - main branch that is live.
  2. staging - branch you make your PRs against.
  3. feat/FEATURE - for features.
  4. fix/THING1 - hot fixes.
  5. bug/THING2 - bug fixes.

Make sure to:

  1. branch your feat/, fix/, or bug/ branches off main.

Git Commit style guide

  1. The First -m: High-level description
    "Added| Edited | etc. FILE"

  2. Second -m: Describe the code in under 240 characters.
    Added x feature in sample.js and updated README.md in the section required.

git commit -m "Feature. Added GIF to README.md -m "Added the GIF was required to explain what is Solidity."

Pull Request Commits

Make sure to reference the issue that you are closing.

Example: Closes #7 - Add CONTRIBUTING.md

Content style guide

Keep it brief but descriptive. Use links. Avoid jargon.

When possible, use pictures or gifs.

Get Support

Open an issue or join our discord.

Made with ❤️ by ConsenSys and GitHub Contributors Image