Browse Source

[ci] Fix mergeable will get mad add/remove label sometimes (#10856)

ref: https://github.com/mergeability/mergeable/issues/643
3.1.0-release
Jiajie Zhong 2 years ago committed by GitHub
parent
commit
9ab1a0cfc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      .github/mergeable.yml

32
.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'

Loading…
Cancel
Save