Posting PRs in grpc device - ni/grpc-device GitHub Wiki

NI GitHub Getting Started

DevCentral GitHub wiki.

You'll need a GitHub account. At some point you'll need to join the NI organization.

Forking

Create your own fork of the grpc-device repo. (Contributing to projects).

Create and modify branches in your fork of the repo. Note that you can also create PRs and trigger workflow actions in your fork repository as needed.

When working with forks, you will need different git commands to interact with the upstream repo (or you can use the github UI). Example from Update main branch in your fork:

git checkout main
git fetch upstream main
git merge upstream/main
git push

The following are NOT RECOMMENDED:

  • Creating personal dev branches directly on ni/grpc-device.
  • Creating long-lived dev branches anywhere (if needed, work with maintainers on an appropriate location).
  • Creating shared dev branches anywhere (if needed, work with maintainers on an appropriate location).

When ready for submission: create a PR from your fork branch to ni/grpc-device.

Peer Review

Some PRs are simple enough that no peer review is needed, but most reviews should be peer reviewed by one reviewer before publishing the review. To create a peer review:

  1. Push your branch to GitHub

  2. Under the Pull Request section, click the Compare & pull button at the top right

  3. Add the [Peer Review] tag to the beginning of the title

    PeerReview

  4. In the description, fill out the three sections with enough detail to give reviewers context for any decisions you've made

    PeerReviewDescription

  5. In the Create pull request at the bottom, click the drop-down arrow on the right and select Create draft pull request.

  6. Click Draft pull request and add a single peer reviewer to review your code.

  7. When the peer reviewer has signed off and you are ready to go to owners, change the title:

    image

  8. Scroll to the bottom and click Ready for review. This will then add owners.

    PublishDraftReview

RFC - Request for Comments

An RFC PR is used to post some code up to get feedback on a specific design decision or potential implementation. An RFC PR should not be reviewed for style and code readability and should have a very specific question asked in the form of a code comment.

To create an RFC review:

  1. Push your branch to GitHub

  2. Under the Pull Request section, click the Compare & pull button at the top right

    CompareAndPullButton

  3. Add the [RFC] tag to the beginning of the title

    RFCTagInTitle

  4. In the description, pose a specific question in the justification section

    RFCDescription

  5. In the Create pull request at the bottom, click the drop-down arrow on the right and select Create draft pull request.

    DraftPullRequestDropdown

  6. Click Draft pull request and add the specific technical experts you would like to ask the question to.

  7. IM them to let them know they should pay attention to this review.

  8. When you have the feedback you would like, do one of the following:

    1. If the PR has lots of comment threads that would add confusion to a normal PR, abandon it.

      ClosePR

    2. If the PR only needs some cleanup in order to be ready for review, push those changes, change the title, and publish it.