potiuk commented on code in PR #41443: URL: https://github.com/apache/airflow/pull/41443#discussion_r1715879415
########## .github/workflows/news-fragment.yml: ########## @@ -0,0 +1,52 @@ +# 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: CI + +on: # yamllint disable-line rule:truthy + pull_request: + types: [labeled, unlabeled, opened, reopened, synchronize] + +jobs: + check-news-fragment: + name: Check News Fragment + runs-on: ubuntu-20.04 + if: "contains(github.event.pull_request.labels.*.name, 'airflow3.0:breaking')" + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + # `towncrier check` runs `git diff --name-only origin/main...`, which + # needs a non-shallow clone. + fetch-depth: 0 + + - name: Check news fragment + run: > + if ! pipx run towncrier check + --dir . + --config newsfragments/config.toml + --compare-with origin/${{ github.base_ref }}; then + + echo "Please check + https://github.com/apache/airflow/blob/main/contributing-docs/16_contribution_workflow.rst + for guidance." + + false + + fi Review Comment: NIT: smth like that (maybe better formatted using `run: |`. Most important is actually explaining what is missing and colored output that shows what the warning is.. Possibly doing it Python-only in selective checks might be a good idea, it already contains changed files and PR labels as fields in SelectiveCheck object and it would avoid bash-isms and could allow using rich for color output. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
