Regenerate or update GitHub pull request comment


Is it possible to regenerate a GitHub comment or update the existing one? The use case is where we add more commits (pr sync event on GitHub) to an existing pull request after the Codecov comment has posted.

Specifically, this pull request has an incorrect list of files in the diff in the comment, and it may be due to the force-push that occurred just before the comment was posted. In this case, I’d like to be able to regenerate the codecov comment.

Commit SHAs

See this pr: Documentation for ExtPtfm by ebranlard · Pull Request #858 · OpenFAST/openfast · GitHub


CI/CD or Build URL


GitHub Actions

Codecov Output

/Users/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n -Q github-action-2.1.0 -Z -f ./regressioncov.xml -F regtests -C 547d45a30e6cb6f8e68dc4420ca0cefb6ac87ec8 -s /Users/runner/work/openfast/openfast -v

[23]([2021-10-06T23:10:53.360Z] ['info']

[24]( _____ _

[25]( / ____| | |

[26]( | | ___ __| | ___ ___ _____ __

[27]( | | / _ \ / _` |/ _ \/ __/ _ \ \ / /

[28]( | |___| (_) | (_| | __/ (_| (_) \ V /

[29]( \_____\___/ \__,_|\___|\___\___/ \_/


[31]( Codecov report uploader 0.1.5

[32]([2021-10-06T23:10:53.372Z] ['info'] => Project root located at: /Users/runner/work/openfast/openfast

[33]([2021-10-06T23:10:53.376Z] ['verbose'] Error searching for upload token in /Users/runner/work/openfast/openfast/.codecov.yaml: YAMLException: bad indentation of a mapping entry (14:19)


[35]( 11 | # this section will govern all default rules of ...

[36]( 12 | default_rules:

[37]( 13 | carryforward: boolean?

[38]( 14 | ignore: [path]?


[40]( 15 | paths: [path]?

[41]( 16 | statuses: [

[42]([2021-10-06T23:10:53.377Z] ['info'] -> No token specified or token is empty

[43]([2021-10-06T23:10:53.377Z] ['verbose'] Start of network processing...

[44]([2021-10-06T23:10:53.377Z] ['verbose'] Searching for files in /Users/runner/work/openfast/openfast

[45]([2021-10-06T23:10:53.386Z] ['info'] Searching for coverage files...

[46]([2021-10-06T23:10:53.509Z] ['info'] => Found 1 possible coverage files:

[47]( ./regressioncov.xml

[48]([2021-10-06T23:10:53.509Z] ['verbose'] End of network processing

[49]([2021-10-06T23:10:53.509Z] ['info'] Processing ./regressioncov.xml...

[50]([2021-10-06T23:10:53.670Z] ['info'] Detected GitHub Actions as the CI provider.

[51]([2021-10-06T23:10:53.670Z] ['verbose'] -> Using the following env variables:

[52]([2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_ACTION: __codecov_codecov-action

[53]([2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_HEAD_REF: f/extptfm-doc

[54]([2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_REF: refs/pull/858/merge

[55]([2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_REPOSITORY: OpenFAST/openfast

[56]([2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_RUN_ID: 1313965089

[57]([2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_SERVER_URL: [](

[58]([2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_SHA: b5dfa0f1318612869d3f98bc32a4b3e30152ca32

[59]([2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_WORKFLOW: Development Pipeline

[60]([2021-10-06T23:10:53.671Z] ['info'] Pinging Codecov:*******&branch=f%2Fextptfm-doc&build=1313965089&

[61]([2021-10-06T23:10:53.672Z] ['verbose'] Passed token was 0 characters long

[62]([2021-10-06T23:10:53.672Z] ['verbose']

[63]( Content-Type: 'text/plain'

[64]( Content-Encoding: 'gzip'

[65]( X-Reduced-Redundancy: 'false'

[66]([2021-10-06T23:10:54.135Z] ['verbose'] Returned upload url:


[68]([2021-10-06T23:10:54.135Z] ['verbose']

[69]( Content-Type: 'text/plain'

[70]( Content-Encoding: 'gzip'

[71]([2021-10-06T23:10:54.135Z] ['info'] Uploading...

[72]([2021-10-06T23:10:54.470Z] ['info'] {"status":"success","resultURL":""}

Expected Results

I would like to see the GitHub comment updated or regenerated (and the previous one deleted) whenever a pull request is synced.

Actual Results

I can’t say that I know exactly what the sequence for the GitHub comment is, but it is consistently posted with incorrect information. Then, after a few minutes, it is updated with correct information. However, when a pull request is synced, I don’t see it updating again to reflect the new information.

@rafmudaf the comment is automatically updated on new commits


Maybe it was a timing thing? On new commits (and force-pushes), the CI still needs to run and Codecov needs time to process those reports.

You can also set it to delete and create a new commit in codecov.yml. See options here.