You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/29 14:21:38 UTC

[GitHub] [pulsar-test-infra] maxsxu commented on a diff in pull request #75: feat: add action of check-pr-title to ensure PR title matches Naming Convention Guide

maxsxu commented on code in PR #75:
URL: https://github.com/apache/pulsar-test-infra/pull/75#discussion_r983613677


##########
docbot/README.md:
##########
@@ -50,10 +50,87 @@ jobs:
 ## Configurations
 
 | Name                    | Description                            | Default                   |
-| ----------------------- |----------------------------------------| ------------------------- |
-| `GITHUB_TOKEN`          | The GitHub Token                       | &nbsp;                   |
+|-------------------------|----------------------------------------|---------------------------|
+| `GITHUB_TOKEN`          | The GitHub Token                       | &nbsp;                    |
 | `LABEL_PATTERN`         | RegExp to extract labels               | `'- \[(.*?)\] ?`(.+?)`' ` |
-| `LABEL_WATCH_LIST`      | Label names to watch, separated by `,` | &nbsp; |
+| `LABEL_WATCH_LIST`      | Label names to watch, separated by `,` | &nbsp;                    |
 | `ENABLE_LABEL_MISSING`  | Add a label missing if none selected   | `true`                    |
-| `LABEL_MISSING`         | The label mssing name                  | `label-missing` |
-| `ENABLE_LABEL_MULTIPLE` | Allow multiple labels selected         | `false`                   |
\ No newline at end of file
+| `LABEL_MISSING`         | The label mssing name                  | `label-missing`           |
+| `ENABLE_LABEL_MULTIPLE` | Allow multiple labels selected         | `false`                   |
+
+
+# action-check-pr-title
+This is a [GitHub Action](https://github.com/features/actions) that ensures your PR title matches the Conventional Commits spec.
+
+The typical use case is to use this in combination with a tool like semantic-release to automate releases.
+
+## Installation
+
+1. [Add the action](https://docs.github.com/en/actions/quickstart) with the following configuration
+```yml
+name: "Check PR title"
+
+on:
+  pull_request_target:
+    types:
+      - opened
+      - edited
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  label:
+    if: ${{ github.repository == 'apache/pulsar' }}
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout action
+        uses: actions/checkout@v3
+        with:
+          repository: apache/pulsar-test-infra
+          ref: master
+
+      - name: Set up Go
+        uses: actions/setup-go@v3
+        with:
+          go-version: 1.18
+
+      - name: Labeling
+        uses: ./docbot title check
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Review Comment:
   ```suggestion
     title-check:
       runs-on: ubuntu-latest
       steps:
         - name: Validating PR Title
           uses: apache/pulsar-test-infra/docbot/cmd/title-check@master
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
   ```



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org