pre-commit-ci / issues

public issues for https://pre-commit.ci
16 stars 3 forks source link

force pushes to PR do not update change list in comment #78

Closed Molkree closed 2 years ago

Molkree commented 3 years ago

When PR is not merged for more than a week (month) and pre-commit.ci force pushes to it with new updates, bot comment with upgrades overview is not being updated with new changes. Example PR where pyupgrade was first updated from v2.21.2 to v2.23.3 and then to v2.24.0 but it's still an old version in bot comment.

asottile commented 3 years ago

yep, unfortunately I can't safely change the description after creation (as the owner of the repository may have altered it)

Molkree commented 3 years ago

That's a bummer 😔 How do bots like @codecov-commenter manage to do it?

asottile commented 3 years ago

they blow away the full contents of the comment (and do it as a separate comment) -- the PR description is a little less "I own this don't touch" than a comment

asottile commented 3 years ago

one idea could maybe be hidden <!-- comment --> markers in the PR? though I'd need to do some more investigation

asottile commented 2 years ago

alright this should be fixed for future created PRs

the way it works is pre-commit.ci now puts a special marker comment before and after the updates text and will keep that in sync with the PR as it pushes it

note that PRs created before today will not be updated -- but anything newly created should have that behaviour

ended up not being as difficult as I though it would be!

thanks again for the issue