These docs are for v4.6. Click to read the latest docs for v2023.

Merge Commits

Merge Commits are unique commits automatically generated by CI providers to run tests against the resulting code of merging tip of pull request into tip of base branch. The commits have the following message:

Merge 5dbd38670e2d2c0d008d5cabccebd66688040abc into 89f5cb881ab3f48409e795b160f244d53869ecdd
- or -
Merge pull request #1 from repo/branch

Below is a diagram of how Codecov will handle comparing merge commits.

master              a  • • b 
refs/pull/#1/merge             mc
PR #1                \ • • x /
  • a is pull request #1 base commit.
  • x is #1 head commit.
  • b is the head of master.
  • mc is the merge commit containing a b x.

When testing Merge Commit

  • Compare b...mc.
  • Status Context codecov/merge/project.
  • mc is not used in compare views like /gh/owner/repo/pull/1/compare.

Testing Pull Request Head

  • Compare a...x.
  • Status Context codecov/project.
  • x is used in compare views like /gh/owner/repo/pull/1/compare.

Merging Pull Requests from GitHub UI

1418

When merging pull requests in GitHub, there will be a new commit with the message Merge pull request #1 from repo/branch. This commit is not generated by CI, and should be tested like any other commit on a branch. Popular CI providers test these commits by default.

If a merge commit was previously tested at the same base head and pull head, then Codecov will recognize this commit as the report for the new merge commit. The commit and source code are equivalent.