Regenerate or update GitHub pull request comment

Description

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

Repository

CI/CD or Build URL

Uploader

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](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:23)[2021-10-06T23:10:53.360Z] ['info']

[24](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:24) _____ _

[25](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:25) / ____| | |

[26](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:26) | | ___ __| | ___ ___ _____ __

[27](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:27) | | / _ \ / _` |/ _ \/ __/ _ \ \ / /

[28](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:28) | |___| (_) | (_| | __/ (_| (_) \ V /

[29](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:29) \_____\___/ \__,_|\___|\___\___/ \_/

[30](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:30)

[31](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:31) Codecov report uploader 0.1.5

[32](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:32)[2021-10-06T23:10:53.372Z] ['info'] => Project root located at: /Users/runner/work/openfast/openfast

[33](https://github.com/OpenFAST/openfast/runs/3821154476#step:14: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)

[34](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:34)

[35](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:35) 11 | # this section will govern all default rules of ...

[36](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:36) 12 | default_rules:

[37](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:37) 13 | carryforward: boolean?

[38](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:38) 14 | ignore: [path]?

[39](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:39)------------------------^

[40](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:40) 15 | paths: [path]?

[41](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:41) 16 | statuses: [

[42](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:42)[2021-10-06T23:10:53.377Z] ['info'] -> No token specified or token is empty

[43](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:43)[2021-10-06T23:10:53.377Z] ['verbose'] Start of network processing...

[44](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:44)[2021-10-06T23:10:53.377Z] ['verbose'] Searching for files in /Users/runner/work/openfast/openfast

[45](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:45)[2021-10-06T23:10:53.386Z] ['info'] Searching for coverage files...

[46](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:46)[2021-10-06T23:10:53.509Z] ['info'] => Found 1 possible coverage files:

[47](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:47) ./regressioncov.xml

[48](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:48)[2021-10-06T23:10:53.509Z] ['verbose'] End of network processing

[49](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:49)[2021-10-06T23:10:53.509Z] ['info'] Processing ./regressioncov.xml...

[50](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:50)[2021-10-06T23:10:53.670Z] ['info'] Detected GitHub Actions as the CI provider.

[51](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:51)[2021-10-06T23:10:53.670Z] ['verbose'] -> Using the following env variables:

[52](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:52)[2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_ACTION: __codecov_codecov-action

[53](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:53)[2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_HEAD_REF: f/extptfm-doc

[54](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:54)[2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_REF: refs/pull/858/merge

[55](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:55)[2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_REPOSITORY: OpenFAST/openfast

[56](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:56)[2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_RUN_ID: 1313965089

[57](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:57)[2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_SERVER_URL: [https://github.com](https://github.com/)

[58](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:58)[2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_SHA: b5dfa0f1318612869d3f98bc32a4b3e30152ca32

[59](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:59)[2021-10-06T23:10:53.670Z] ['verbose'] GITHUB_WORKFLOW: Development Pipeline

[60](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:60)[2021-10-06T23:10:53.671Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.5&token=*******&branch=f%2Fextptfm-doc&build=1313965089&build_url=https%3A%2F%2Fgithub.com%2FOpenFAST%2Fopenfast%2Factions%2Fruns%2F1313965089&commit=547d45a30e6cb6f8e68dc4420ca0cefb6ac87ec8&job=Development+Pipeline&pr=858&service=github-actions&slug=OpenFAST%2Fopenfast&name=&tag=&flags=regtests&parent=

[61](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:61)[2021-10-06T23:10:53.672Z] ['verbose'] Passed token was 0 characters long

[62](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:62)[2021-10-06T23:10:53.672Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.5&branch=f%2Fextptfm-doc&build=1313965089&build_url=https%3A%2F%2Fgithub.com%2FOpenFAST%2Fopenfast%2Factions%2Fruns%2F1313965089&commit=547d45a30e6cb6f8e68dc4420ca0cefb6ac87ec8&job=Development+Pipeline&pr=858&service=github-actions&slug=OpenFAST%2Fopenfast&name=&tag=&flags=regtests&parent=

[63](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:63) Content-Type: 'text/plain'

[64](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:64) Content-Encoding: 'gzip'

[65](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:65) X-Reduced-Redundancy: 'false'

[66](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:66)[2021-10-06T23:10:54.135Z] ['verbose'] Returned upload url: https://codecov.io/github/OpenFAST/openfast/commit/547d45a30e6cb6f8e68dc4420ca0cefb6ac87ec8

[67](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:67)https://storage.googleapis.com/codecov/v4/raw/2021-10-06/8649FA4242F183FC30AF6F46039F4C1A/547d45a30e6cb6f8e68dc4420ca0cefb6ac87ec8/91c368cb-808c-4ab7-96f1-8accc64231ed.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20211006%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20211006T231054Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=52ce646bae5ec6cb7b4c359b292f6dc13953b97b0d7690ae67f9dcf6f68b68af

[68](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:68)[2021-10-06T23:10:54.135Z] ['verbose'] https://storage.googleapis.com/codecov/v4/raw/2021-10-06/8649FA4242F183FC30AF6F46039F4C1A/547d45a30e6cb6f8e68dc4420ca0cefb6ac87ec8/91c368cb-808c-4ab7-96f1-8accc64231ed.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20211006%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20211006T231054Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=52ce646bae5ec6cb7b4c359b292f6dc13953b97b0d7690ae67f9dcf6f68b68af

[69](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:69) Content-Type: 'text/plain'

[70](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:70) Content-Encoding: 'gzip'

[71](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:71)[2021-10-06T23:10:54.135Z] ['info'] Uploading...

[72](https://github.com/OpenFAST/openfast/runs/3821154476#step:14:72)[2021-10-06T23:10:54.470Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/OpenFAST/openfast/commit/547d45a30e6cb6f8e68dc4420ca0cefb6ac87ec8"}

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

image

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.