gianm commented on code in PR #19089:
URL: https://github.com/apache/druid/pull/19089#discussion_r2912596182


##########
.github/workflows/pr-checks.yml:
##########
@@ -0,0 +1,101 @@
+# 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.
+
+# Adapted from 
https://github.com/lance-format/lance/blob/main/.github/workflows/pr-title.yml
+
+name: PR Checks
+
+on:
+  # This needs to be a pull_request_target event to allow the workflow to
+  # modify labels on the PR.
+  pull_request_target:
+    types: [opened, edited, synchronize, reopened]
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || 
github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  labeler:

Review Comment:
   What's the `labeler` job for? We have a labeler job already in 
`.github/workflows/labeler.yml`, it seems redundant to have two.



##########
benchmarks/pom.xml:
##########
@@ -17,88 +17,94 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-
 <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
   <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>druid-benchmarks</artifactId>
-  <name>druid-benchmarks</name>
-  <packaging>jar</packaging>
   <parent>
     <groupId>org.apache.druid</groupId>
     <artifactId>druid</artifactId>
     <version>37.0.0-SNAPSHOT</version>
   </parent>
 
+  <artifactId>druid-benchmarks</artifactId>
+  <packaging>jar</packaging>
+  <name>druid-benchmarks</name>
+
+  <properties>
+    <jmh.version>1.21</jmh.version>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <uberjar.name>benchmarks</uberjar.name>
+  </properties>
+
   <dependencies>
     <dependency>
-      <groupId>org.jdbi</groupId>

Review Comment:
   I don't think we need to enforce that the dependencies are sorted. I don't 
believe it adds much, and the diff is gigantic, which always makes me think 
twice about something.
   
   Enforced ordering of the top-level pom sections (parent, artifactId, 
packaging, name, properties, dependencies, etc) does seem more useful and less 
likely to generate a gigantic diff, if you'd want to explore that.



##########
.github/workflows/pr-checks.yml:
##########
@@ -0,0 +1,101 @@
+# 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.
+
+# Adapted from 
https://github.com/lance-format/lance/blob/main/.github/workflows/pr-title.yml
+
+name: PR Checks
+
+on:
+  # This needs to be a pull_request_target event to allow the workflow to
+  # modify labels on the PR.
+  pull_request_target:
+    types: [opened, edited, synchronize, reopened]
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || 
github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  labeler:
+    permissions:
+      pull-requests: write
+    name: Label PR
+    runs-on: ubuntu-latest
+    steps:
+      - uses: srvaroa/labeler@master
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          fail_on_error: true
+  commitlint:
+    permissions:
+      pull-requests: write
+    name: Verify PR title / description conforms to semantic-release
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/setup-node@v4

Review Comment:
   I've also seen https://github.com/amannn/action-semantic-pull-request 
(`uses: amannn/action-semantic-pull-request@v5`) used to do this. Being a 
dedicated github action, it seems preferable since usage is simpler.



##########
.github/workflows/pr-checks.yml:
##########
@@ -0,0 +1,101 @@
+# 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.
+
+# Adapted from 
https://github.com/lance-format/lance/blob/main/.github/workflows/pr-title.yml
+
+name: PR Checks
+
+on:
+  # This needs to be a pull_request_target event to allow the workflow to
+  # modify labels on the PR.
+  pull_request_target:
+    types: [opened, edited, synchronize, reopened]
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || 
github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  labeler:
+    permissions:
+      pull-requests: write
+    name: Label PR
+    runs-on: ubuntu-latest
+    steps:
+      - uses: srvaroa/labeler@master
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          fail_on_error: true
+  commitlint:
+    permissions:
+      pull-requests: write
+    name: Verify PR title / description conforms to semantic-release
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/setup-node@v4
+        with:
+          node-version: "20"
+      # These rules are disabled because Github will always ensure there
+      # is a blank line between the title and the body and Github will
+      # word wrap the description field to ensure a reasonable max line
+      # length.
+      - run: npm install @commitlint/config-conventional
+      - run: >
+          echo 'module.exports = {
+            "rules": {
+              "body-max-line-length": [0, "always", Infinity],
+              "footer-max-line-length": [0, "always", Infinity],
+              "body-leading-blank": [0, "always"]
+            }
+          }' > .commitlintrc.js
+      - run: npx commitlint --extends @commitlint/config-conventional 
--verbose <<< $COMMIT_MSG

Review Comment:
   Docs (https://github.com/srvaroa/labeler) suggest the builtin list is the 
following. I think we should customize the list. In addition to these, it's 
also useful to have `backport`, `release` (release-related changes like version 
bumps), `revert`, and `minor` (small non-user-visible changes like correcting 
comments).
   
   ```
   [
     'build',
     'chore',
     'ci',
     'docs',
     'feat',
     'fix',
     'perf',
     'refactor',
     'revert',
     'style',
     'test'
   ]
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to