mergeable.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. ---
  18. version: 2
  19. mergeable:
  20. # we can not use `pull_request.*` which including event `pull_request.labeled`, according to https://github.com/mergeability/mergeable/issues/643,
  21. # otherwise mergeable will keep add or remove label endless, we just need this CI act like the default behavior as
  22. # GitHub action workflow `pull_requests` https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request like,
  23. # which only trigger runs when a pull_request event's activity type is opened, synchronize, or reopened
  24. - when: pull_request.opened, pull_request.reopened, pull_request.synchronize
  25. name: sync-sql-ddl
  26. validate:
  27. # Sql files must change synchronize
  28. - do: dependent
  29. files:
  30. - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql'
  31. - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql'
  32. - 'dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql'
  33. message: 'Sql files not change synchronize'
  34. # Add labels 'sql not sync' and comment to reviewers if Sql files not change synchronize
  35. fail:
  36. - do: comment
  37. payload:
  38. body: >
  39. :warning: This PR do not change database DDL synchronize.
  40. leave_old_comment: false
  41. - do: labels
  42. add: 'sql not sync'
  43. # Remove labels 'sql not sync' if pass
  44. pass:
  45. - do: labels
  46. delete: 'sql not sync'
  47. - when: pull_request.*
  48. name: milestone-label-check
  49. validate:
  50. - do: milestone
  51. no_empty:
  52. enabled: false # Cannot be empty when true.
  53. message: 'Milestone is required and cannot be empty.'
  54. - do: label
  55. and:
  56. - must_include:
  57. regex: 'feature|bug|improvement|document|chore|revert'
  58. message: 'Label must include one of the following: `feature`, `bug`, `improvement`, `document`, `chore`, `revert`'
  59. - must_include:
  60. regex: 'ready-to-merge'
  61. message: 'Please check if there are PRs that already have a `ready-to-merge` label and can be merged, if exists please merge them first.'