Now you've created your pull request and you're ready to continue the process. In this section, we're going to cover how to deal with the built in checks failing, and how to submit code to an active pull request. You'll learn to read the logs generated by the check system, and how to take that information and apply it to fixing your code.

Many of the Adafruit repos have a built in checks system called Github Actions, which does what is called continuous integration testing. This check will verify your code for style and syntax, and make sure that everything builds with your code included.

The fact is, you're going to run into these checks failing, no matter how many times you go over your code before submitting. So, it's important to be able to read the log generated by these code check tools. It will contain any errors found and allow you to more easily find them in your code.

Once you've clicked the Create pull request button, it will automatically take you to your newly created PR. Let's take a look.

Pull Request Explored

The title of the PR will be what you entered into the message title when you created it, followed by the PR number.

The next section tells you the current status of the PR. This PR is Open. I am currently requesting to merge 3 commits into adafruit:master from dherrada:example-fix. Remember, I'm asking to take the code from my branch and add it to the master branch of the original repo.

The next section includes the body of the message you submitted with your pull request. The tabs at the top lead you to different sections of the PR. You can view a list of the commits, the checks, and the files changed in a diff format like included when you created your PR. Click on each one to view its contents.

The upper right of this section includes some green and red numbers and boxes. These indicate the number of lines of code added and removed. You'll find they reflect the color coding found in the Files Changed section.

Next is a list of the commits included with the initial PR. You'll notice the last commit has a yellow dot next to it. This is because the checks have not yet completed.

After the PR is created, the code checkers will begin their testing. Depending on the size of the repo, this can take anywhere from a few seconds to several minutes. Until it's completed, you'll see the final commit has a yellow dot and the beginning of the next section will be yellow and say "Some checks haven't completed yet".

The second part of this section should say "This branch has no conflicts with the base branch". If you created your pull request when it didn't say "Able to merge" in green at the top, then this might look different.

The last part is the merge button, which won't turn green until everything is set. I have merge permissions on this repo, so the Merge pull request button shows up for me.

If you don't have merge permissions on a repo, the end of this section may look like either of the following.

In the event that a repo is setup to require a review before merging is allowed, the last section may include something similar to the following warning in place of the section that says "This branch has no conflicts..."

This guide was first published on Nov 25, 2020. It was last updated on Mar 08, 2024.

This page (Open Pull Request) was last updated on Mar 08, 2024.

Text editor powered by tinymce.