diff --git a/.github/mergeable.yml b/.github/mergeable.yml index 2b74fe2a08..acbfd32c78 100644 --- a/.github/mergeable.yml +++ b/.github/mergeable.yml @@ -17,7 +17,11 @@ --- version: 2 mergeable: - - when: pull_request.*, pull_request_review.* + # we can not use `pull_request.*` which including event `pull_request.labeled`, according to https://github.com/mergeability/mergeable/issues/643, + # otherwise mergeable will keep add or remove label endless, we just need this CI act like the default behavior as + # GitHub action workflow `pull_requests` https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request like, + # which only trigger runs when a pull_request event's activity type is opened, synchronize, or reopened + - when: pull_request.opened, pull_request.reopened, pull_request.synchronize name: synchronize change for sql files validate: # Sql files must change synchronize @@ -27,16 +31,16 @@ mergeable: - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql' - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql' message: 'Sql files not change synchronize' -# Temporary comment this because sometime mergable will become mad keep adding or deleting the label -# # Add labels 'sql not sync' and comment to reviewers if Sql files not change synchronize -# fail: -# - do: comment -# payload: -# body: > -# :warning: This PR do not change database DDL synchronize. -# - do: labels -# add: 'sql not sync' -# # Remove labels 'sql not sync' if pass -# pass: -# - do: labels -# delete: 'sql not sync' + # Add labels 'sql not sync' and comment to reviewers if Sql files not change synchronize + fail: + - do: comment + payload: + body: > + :warning: This PR do not change database DDL synchronize. + leave_old_comment: false + - do: labels + add: 'sql not sync' + # Remove labels 'sql not sync' if pass + pass: + - do: labels + delete: 'sql not sync'