Yicong-Huang commented on code in PR #5622: URL: https://github.com/apache/texera/pull/5622#discussion_r3393535661
########## .github/workflows/template-compliance-warning.yml: ########## @@ -0,0 +1,195 @@ +# 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. + +# Post a non-blocking warning when a pull request (or issue) is opened +# without following our template, and clear it automatically once the +# author fixes the description. +# +# Designed to be cheap on CI: +# * Single `github-script` job, no build, no full checkout (only a +# sparse-checkout of the one message .txt file), so a run is a few +# seconds of an ubuntu-latest runner. +# * Triggers only on `opened` / `edited`, never on `synchronize`, so +# it does NOT run on every push to a PR branch. +# * Skips drafts and bots, so WIP and automation don't get nagged. +# * Posts a single sticky comment (idempotency marker) that is +# UPDATED in place while the template is incomplete and DELETED once +# it is followed, so it never piles up duplicate comments. +# +# Issue templates here are GitHub form (`.yaml`) templates whose +# required fields are already enforced at submission time, so for issues +# this only catches a fully blank body (e.g. a blank issue). PR +# templates cannot be enforced by GitHub, which is the main case this +# covers. +# +# Uses `pull_request_target` so PRs from forks are still checked. +# A `pull_request` run from a fork gets a read-only token and could not +# comment. +name: Template compliance warning +on: + issues: + types: [opened, edited] + pull_request_target: + types: [opened, edited] Review Comment: combine it with first time contributor CI? -- 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]
