Lullabot / drainpipe

GNU General Public License v3.0
32 stars 14 forks source link

Replace ComposerLockDiff functionality with a sticky PR comment instead #332

Closed justafish closed 1 month ago

justafish commented 11 months ago

Trying to preserve the original content of a comment is causing too many bugs, and doesn't work well when there are edit conflicts

davereid commented 8 months ago

Related: https://github.com/Lullabot/drainpipe/issues/317

davereid commented 8 months ago

My proposal (with approval already from @justafish) is to replace updating the PR body with a sticky comment using https://github.com/marocchino/sticky-pull-request-comment.

mrdavidburns commented 8 months ago

@YesCT and I were just talking about this yesterday. We've had multiple projects where we successfully switched to posting to a comment to avoid this issue. +1 for switching Drainpipe posting to comment.

davereid commented 8 months ago

Also would be looking to remove DDEV as a dependency of this task to help speed up the job (would also fix https://github.com/Lullabot/drainpipe/issues/239) and just use composer natively like we did on another client independent of Drainpipe which seemed to work really well and be fast.

deviantintegral commented 8 months ago

I updated this to also add a one-line change to only run the action at all if composer.lock is modified.

davereid commented 7 months ago

I think it would still need to run on push because it's possible for a PR to have a composer.lock change initially, but then not have one after merging in updates, so it would still need to delete the comment in that case. But running the diff could be conditional on changes in that file.

justafish commented 1 month ago

here's an alternative solution that combines it with the security checks - 2 birds with 1 stone! https://github.com/Lullabot/drainpipe/pull/636