Automattic / a8c-ci-toolkit-buildkite-plugin

A caching plugin that can be invoked from your build script.
22 stars 5 forks source link

Remove dependency diff comment if no changes in Gradle files is detected #129

Open wzieba opened 1 month ago

wzieba commented 1 month ago

Reproduction:

  1. Prepare a PR with a change to .gradle, .gradle.kts or .toml file
  2. Wait for dependency diff comment to appear
  3. Revert change from point 1

Expected behavior: Dependency diff commit is removed

Actual behavior: Dependency diff commit is not removed.

Reason: because no change is detected, the script exits early if no Gradle changes are detected. The script should remove the comment in such case:

https://github.com/Automattic/a8c-ci-toolkit-buildkite-plugin/blob/e05b61bd2bba9ea507c5185e576ef97578903b38/bin/comment_with_dependency_diff#L69-L74