# Ignoring pull requests from certain branches

**URL:** <https://community.codecov.com/t/ignoring-pull-requests-from-certain-branches/3686>\
**Category:** Support\
**Created:** [June 2, 2022, 2:58am UTC](https://community.codecov.com/t/ignoring-pull-requests-from-certain-branches/3686 "2022-06-02T02:58:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![finalight](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/finalight/32/2464_2.png) [@finalight](https://community.codecov.com/u/finalight)\
**Post date:** [June 2, 2022, 2:58am UTC](https://community.codecov.com/t/ignoring-pull-requests-from-certain-branches/3686/1 "2022-06-02T02:58:05Z")

</div>

Is it possible to ignore certain branches wilcard, so to prevent codecov from happening?

for my scenario: my team do git flow where there’s a release branch, and we want to merge the release branch back to the main branch.  
However, for these branches, we want to skip various jobs (linting/testing/etc/etc) because we don’t see the need to. Unfortunately, codecov will wait indefinitely for the test reports to be out, which will not happen for those branches

---

<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:** [June 4, 2022, 10:08pm UTC](https://community.codecov.com/t/ignoring-pull-requests-from-certain-branches/3686/2 "2022-06-04T22:08:01Z")

</div>

I’m confused @finalight, is Codecov waiting because it is set as a `required` status check?

---

<div class="post-metadata">

**Author:** ![finalight](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/finalight/32/2464_2.png) [@finalight](https://community.codecov.com/u/finalight)\
**Post date:** [June 6, 2022, 2:24pm UTC](https://community.codecov.com/t/ignoring-pull-requests-from-certain-branches/3686/3 "2022-06-06T14:24:00Z")

</div>

which required are you referring to? the one in codecov settings or the one in github repo settings?

---

<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:** [June 6, 2022, 2:27pm UTC](https://community.codecov.com/t/ignoring-pull-requests-from-certain-branches/3686/4 "2022-06-06T14:27:47Z")

</div>

@finalight I meant the one in GitHub settings

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/codecov/original/2X/c/ced5ca59afb9276ec88d3ee81655f84e87ee8a36.png)  
as an example

---

<div class="post-metadata">

**Author:** ![finalight](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/finalight/32/2464_2.png) [@finalight](https://community.codecov.com/u/finalight)\
**Post date:** [June 6, 2022, 2:33pm UTC](https://community.codecov.com/t/ignoring-pull-requests-from-certain-branches/3686/5 "2022-06-06T14:33:30Z")

</div>

yea, i checked, it is required.

i don’t think my team can remove that, because we need that for other branches → master

but at the same time, release branch → master should just pass as it is

---

<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:** [August 16, 2022, 7:30pm UTC](https://community.codecov.com/t/ignoring-pull-requests-from-certain-branches/3686/6 "2022-08-16T19:30:33Z")

</div>

@finalight I’m sorry it took me awhile to get back to you. I’ve been wracking my brain on this one, because I don’t think we support that flow, but I want to see if the following is a workable solution. The issue is that without any uploads, Codecov isn’t aware of the commit or to return a status check.

1. Add [Flags](https://docs.codecov.com/docs/flags) to all uploads in CI. If you are using the CircleCI orb, you should be able to pass in something like

```yaml
- codecov/upload:
    flags: <some useful name>

```

What we are doing here is telling Codecov to label coverage reports are they are being uploaded.

1. Set those flags to be [Carryforward](https://docs.codecov.com/docs/carryforward-flags). You should be able to do this in the [codecov.yml](https://docs.codecov.com/docs/codecov-yaml) by doing

```auto
flag_management:
  default_rules:
    carryforward: true

```

Now we are telling Codecov that IF we do not upload a coverage report with a given label (as specified in part 1), pull the most recent commit with that flag and use that for coverage. The purpose of this is to keep consistent coverage even when you don’t upload a coverage report.

1. Ok, now we need to upload a “fake” coverage report to Codecov. It still need to hold some data, or Codecov will assume it’s an empty coverage report. This will need to be uploaded all the time, but it should not require any tests to be run. I don’t know what your current coverage reports look like, or what line of code you will assume is ALWAYS run. If you could share a commit SHA, maybe we can figure this out. If you are feeling skilled enough, you can create a report based off of a support [coverage format](https://docs.codecov.com/docs/supported-report-formats).

2. I think you will need to still run tests and upload coverage one time on the `release` and `master` branch, afterwards you should be good.

Let me know if this helps or if you need more help setting this up. I’m sorry it’s not really a smooth solution, but I’m hoping it’ll work for you.
