Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 3.84 KB

Contributing.md

File metadata and controls

68 lines (50 loc) · 3.84 KB

Table of Contents

Contributing

How to Install Repo on a new Computer:

Clone this repository

$ git clone https://github.com/Team3256/FRC_Programming_2020.git

Install all necessary tools: Gradle, Third-Party libraries, etc.

$ ./gradlew

Open the project in IntelliJ and make the edits you want!

Any time you want to make a change:

We are currently using Github Flow, which can be read about here.

  1. Create and checkout a new branch
    • git checkout -b <your_branch_name>, where <your_branch_name> is a descriptive name for your branch. For example fix-shooter-wheel, two-ball-auto, or climbing. Use dashes in the branch name, not underscores.
  2. Make any code changes you need/want to make.
  3. Commit your work
  4. Make a Pull Request of your Branch
    • Once you finish your code, create a pull request and ask some people to review your code.
  5. Wait for Others to Review your Code
    • It might take some time for others to review your code, so feel free to work on something else in the meantime.
    • If you make any changes you can ask reviewers to re-review your code.
    • Note: In order to Merge your branch with master you need to have at least 2 reviewers approve of your changes.
  6. Merge your Pull Request
    • If there are no conflicts select Squash and Merge, write a good commit message and merge the changes.
    • If there are conflicts, change them locally on your branch, push them, and then hit Squash and Merge.
  7. ???
  8. Profit

Tips for Code Review

When you review someone else's code, make sure you can understand what they changed and why.

If something does not seem necessary or you don't know what it does, make sure to ask in the pull request.

Comment on 1 or more lines of code:

  1. On the Files Changed tab of the pull request, navigate to the file you want to comment on.
  2. Select the blue plus (+) next to the line or hold and drag on the plus to select multiple lines.
  3. Either Start a review or if you've already started a review, add a comment to your review.
  4. When done adding comments select either Approve, Comment, or Request Changes to finish your review.

Finishing Code Reviews

  • Request Changes will block the pull request, until the same reviewer approves of the changes. The best use case for this is something that is critical to the functionality of the program or something that cripples readability.

  • Comment will only add a comment and does not deny or approve the request, these should be used for changes that might not be entirely required but can help add to the code.(eg. formatting)

  • Approve will indicate that you see nothing wrong and the changes should be merged into the main branch.