diff --git a/.github/workflows/automatic-email-notif-on-ddl-change.yml b/.github/workflows/automatic-email-notif-on-ddl-change.yml new file mode 100644 index 00000000000..6d0fa62cd63 --- /dev/null +++ b/.github/workflows/automatic-email-notif-on-ddl-change.yml @@ -0,0 +1,62 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Automatic email notification on DDL change + +on: + pull_request: + types: + - closed + +jobs: + notify: + if: >- + github.event.pull_request.merged == true && + contains(github.event.pull_request.labels.*.name, 'ddl-change') + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + sparse-checkout: sql/updates/ + + - name: Get added file in sql/updates/ + id: get_sql_file + run: | + FILE=$(git diff --name-only --diff-filter=A \ + ${{ github.event.pull_request.base.sha }} \ + ${{ github.event.pull_request.merge_commit_sha }} \ + -- 'sql/updates/') + echo "sql_file=$FILE" >> $GITHUB_OUTPUT + - name: Send email + uses: dawidd6/action-send-mail@v7 + with: + server_address: smtp.gmail.com + server_port: 465 + secure: true + username: ${{secrets.NOREPLY_EMAIL_USERNAME}} + password: ${{secrets.NOREPLY_EMAIL_PASSWORD}} + subject: Actions Required After Pulling Latest Update + to: dev@texera.apache.org + from: ${{ github.event.pull_request.user.login }} + body: | + Hi all, + We have merged PR #${{ github.event.pull_request.number }} (${{ github.event.pull_request.html_url }}): ${{github.event.pull_request.title}}. To incorporate the change, please apply ${{ steps.get_sql_file.outputs.sql_file }} to your local Postgres instance and run sbt jooqGenerate to generate jooq classes. + + Best, + ${{ github.event.pull_request.user.login }} + reply_to: dev@texera.apache.org \ No newline at end of file diff --git a/LICENSE b/LICENSE index 6734840ae8d..27b73f30b8a 100644 --- a/LICENSE +++ b/LICENSE @@ -231,6 +231,10 @@ This product bundles code derived from TypeFox monaco-languageclient: Copyright (c) 2024 TypeFox and others. Source: https://github.com/TypeFox/monaco-languageclient +This product incorporates dawidd6-action-send-mail as a GitHub Actions workflow dependency: + Copyright (c) 2020 Dawid Dziurla + Source: https://github.com/dawidd6/action-send-mail + This product includes SVG icons from SVGRepo: - frontend/src/assets/svg/operator-view-result.svg - frontend/src/assets/svg/operator-reuse-cache-valid.svg