This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 9ab1a0cfc4 [ci] Fix mergeable will get mad add/remove label sometimes
(#10856)
9ab1a0cfc4 is described below
commit 9ab1a0cfc4210491c770c95ed85340bec457f365
Author: Jiajie Zhong <[email protected]>
AuthorDate: Sat Jul 9 10:19:09 2022 +0800
[ci] Fix mergeable will get mad add/remove label sometimes (#10856)
ref: https://github.com/mergeability/mergeable/issues/643
---
.github/mergeable.yml | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
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'