# Difference between branch and branches for badges

**URL:** <https://community.codecov.com/t/difference-between-branch-and-branches-for-badges/3923>\
**Category:** Support\
**Created:** [October 19, 2022, 5:57am UTC](https://community.codecov.com/t/difference-between-branch-and-branches-for-badges/3923 "2022-10-19T05:57:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmsche](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jmsche/32/2691_2.png) [@jmsche](https://community.codecov.com/u/jmsche)\
**Post date:** [October 19, 2022, 5:57am UTC](https://community.codecov.com/t/difference-between-branch-and-branches-for-badges/3923/1 "2022-10-19T05:57:37Z")

</div>

## Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.  
 I have verified that my repository is using the [Codecov GitHub app](https://github.com/apps/codecov), if using GitHub  
 I have [validated](https://docs.codecov.com/docs/codecov-yaml#validate-your-repository-yaml) my `codecov.yaml` configuration file.  
 I have filled out the below sections to the best of my ability.

### Description

Hi, for some reason my [shields.io](http://shields.io) badge does not display the correct coverage percentage (see issue on GitHub: [Wrong percentage for codecov · Issue #8545 · badges/shields · GitHub](https://github.com/badges/shields/issues/8545))

chris48s reported that there is a difference of percentage between these two badge URLs (badges from codecov, not [shields.io](http://shields.io)):

- [https://codecov.io/gh/leapt/core-bundle/branch/4.x/graph/badge.svg](https://codecov.io/gh/leapt/core-bundle/branch/4.x/graph/badge.svg)
- [https://codecov.io/gh/leapt/core-bundle/branches/4.x/graph/badge.svg](https://codecov.io/gh/leapt/core-bundle/branches/4.x/graph/badge.svg)

Any reason why this happens?

### CI/CD URL

[https://github.com/leapt/core-bundle/actions/runs/3274101549/jobs/5387174880](https://github.com/leapt/core-bundle/actions/runs/3274101549/jobs/5387174880)

### Codecov Output

```auto
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (20f9c9d78483fce977b6cc39e231a734a23bcd36f4d536bb7355222fb88d02bc codecov)
==> Running version latest
==> Running version v0.3.2
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n -Q github-action-3.1.1
[2022-10-18T14:02:03.424Z] ['info'] 
     _____ _
    / ____ | | |
   | | _____ | | ______  _______
   | | / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |__/ (_| (_) \ V /
    \ _____\___ / \ __,_|\___ |\ ___\___ / \_/

  Codecov report uploader 0.3.2
[2022-10-18T14:02:03.435Z] ['info'] => Project root located at: /home/runner/work/core-bundle/core-bundle
[2022-10-18T14:02:03.436Z] ['info'] -> No token specified or token is empty
[2022-10-18T14:02:03.445Z] ['info'] Searching for coverage files...
[2022-10-18T14:02:03.543Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-10-18T14:02:03.543Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2022-10-18T14:02:03.543Z] ['info'] => Found 1 possible coverage files:
  coverage.xml
[2022-10-18T14:02:03.544Z] ['info'] Processing /home/runner/work/core-bundle/core-bundle/coverage.xml...
[2022-10-18T14:02:03.570Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-10-18T14:02:03.572Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&token= ******* &branch=4.x&build=3274101549&build_url=https%3A%2F%2Fgithub.com%2Fleapt%2Fcore-bundle%2Factions%2Fruns%2F3274101549&commit=96fc94c147ec997847479bea67619b05c95cecc4&job=Continuous+Integration&pr=&service=github-actions&slug=leapt%2Fcore-bundle&name=&tag=&flags=&parent=
[2022-10-18T14:02:04.268Z] ['info'] https://app.codecov.io/github/leapt/core-bundle/commit/96fc94c147ec997847479bea67619b05c95cecc4
https://storage.googleapis.com/codecov/v4/raw/2022-10-18/97EA7A949D4B4D9E0E5FF24727F54AB4/96fc94c147ec997847479bea67619b05c95cecc4/c6c8f32b-acb4-4404-a3bc-6fcb19857b68.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20221018%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20221018T140204Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=b41fbd8b973ce0a1e6971dc52ad9d2d3b067fdef7effdcd26b31334574ae48db
[2022-10-18T14:02:04.268Z] ['info'] Uploading...
[2022-10-18T14:02:04.509Z] ['info'] {"status":"success","resultURL":"https://app.codecov.io/github/leapt/core-bundle/commit/96fc94c147ec997847479bea67619b05c95cecc4"}

```

### Expected Results

I’d expect the same percentage (47%) to appear on both badge URLs

### Actual Results

There a percentage difference between the two badges:

- [https://codecov.io/gh/leapt/core-bundle/branch/4.x/graph/badge.svg](https://codecov.io/gh/leapt/core-bundle/branch/4.x/graph/badge.svg)
- [https://codecov.io/gh/leapt/core-bundle/branches/4.x/graph/badge.svg](https://codecov.io/gh/leapt/core-bundle/branches/4.x/graph/badge.svg)

### Additional Information

N/A

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [October 24, 2022, 2:23pm UTC](https://community.codecov.com/t/difference-between-branch-and-branches-for-badges/3923/2 "2022-10-24T14:23:00Z")

</div>

@jmsche `branch` is correct. `branches` ignores the `4.x` and defaults to your default branch, in this case `master`. You can see the last [commits](https://app.codecov.io/gh/leapt/core-bundle/commits) show 25.74% coverage.

---

<div class="post-metadata">

**Author:** ![jmsche](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/jmsche/32/2691_2.png) [@jmsche](https://community.codecov.com/u/jmsche)\
**Post date:** [October 24, 2022, 2:37pm UTC](https://community.codecov.com/t/difference-between-branch-and-branches-for-badges/3923/3 "2022-10-24T14:37:20Z")

</div>

Thanks for the information. Just switched the main branch to 4.x and I get the correct percentage.
