You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/06/11 13:36:07 UTC

[GitHub] [incubator-inlong] shink opened a new pull request, #4637: [INLONG-4636][CI] Add check PR title workflow

shink opened a new pull request, #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637

   Fixes #4636
   
   ### Motivation
   
   Add check PR title workflow.
   
   ### Modifications
   
   Add check PR title workflow.
   The correct title should start with `[WIP]` or `[INLONG-xxx]`, where **xxx** is the issue number, e.g. `[INLONG-123]`.
   


-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] shink commented on a diff in pull request #4637: [INLONG-4636][CI] Add check PR title workflow

Posted by GitBox <gi...@apache.org>.
shink commented on code in PR #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637#discussion_r895029493


##########
.github/workflows/ci_check_pr_title.yaml:
##########
@@ -0,0 +1,46 @@
+#
+# 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: InLong Check Pull Request Title
+
+on:
+  pull_request_target:
+    types:
+      - opened
+      - reopened
+      - edited
+      - synchronize
+
+jobs:
+  check:
+    name: Check pull request title
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      # The correct title should start with [WIP] or [INLONG-xxx],
+      # where xxx is the issue number, e.g. [INLONG-123].
+      - name: Check title
+        run: |
+          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\].*$ ]]; then
+            echo "This pull request title is not valid."
+            echo "The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123]."
+            exit 1
+          fi
+        env:
+          PR_TITLE: ${{ github.event.pull_request.title }}

Review Comment:
   > The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123].
   
   Is it OK?
   



-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] shink commented on a diff in pull request #4637: [INLONG-4636][CI] Add check PR title workflow

Posted by GitBox <gi...@apache.org>.
shink commented on code in PR #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637#discussion_r895101014


##########
.github/workflows/ci_check_pr_title.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: InLong Check Pull Request Title
+
+on:
+  pull_request_target:
+    types:
+      - opened
+      - reopened
+      - edited
+      - synchronize
+
+jobs:
+  check:
+    name: Check pull request title
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      # The correct title should start with [WIP] or [INLONG-xxx],
+      # where xxx is the issue number, e.g. [INLONG-123].
+      - name: Check title
+        if: ${{ github.event_name == 'pull_request_target' }}
+        run: |
+          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\].*$ ]]; then
+            echo "This pull request title is not valid."
+            echo "The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123]."
+          
+            # add a job summary
+            echo "## This pull request title is not valid! :bug:" >> $GITHUB_STEP_SUMMARY
+            echo "The correct title should start with \`[WIP]\` or \`[INLONG-xxx]\`, where **xxx** is the issue number, e.g. \`[INLONG-123]\`." >> $GITHUB_STEP_SUMMARY

Review Comment:
   If the title is not valid, the job summary will be added.
   ![image](https://user-images.githubusercontent.com/49934421/173216172-9253e02e-b9a4-4075-b4e3-6a91a6d9a6b9.png)
   



-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] shink commented on a diff in pull request #4637: [INLONG-4636][CI] Add check PR title workflow

Posted by GitBox <gi...@apache.org>.
shink commented on code in PR #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637#discussion_r897508287


##########
.github/workflows/ci_check_pr_title.yml:
##########
@@ -38,13 +38,17 @@ jobs:
       - name: Check title
         if: ${{ github.event_name == 'pull_request_target' }}
         run: |
-          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\].*$ ]]; then
+          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\]\[[a-zA-Z]+\].*$ ]]; then
             echo "This pull request title is not valid."
-            echo "The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123]."
+            echo "Title Example: [INLONG-XYZ][Component] Title of the pull request"
+            echo "XYZ should be replaced by the actual GitHub Issue number, e.g. [INLONG-123]"
+            echo "Component should be replaced by the InLong component name, e.g. [INLONG-123][Manager]"
           
             # add a job summary
             echo "## This pull request title is not valid! :bug:" >> $GITHUB_STEP_SUMMARY
-            echo "The correct title should start with \`[WIP]\` or \`[INLONG-xxx]\`, where **xxx** is the issue number, e.g. \`[INLONG-123]\`." >> $GITHUB_STEP_SUMMARY
+            echo "Title Example: \`[INLONG-XYZ][Component] Title of the pull request\`" >> $GITHUB_STEP_SUMMARY
+            echo "> - **XYZ** should be replaced by the actual [GitHub Issue](https://github.com/apache/incubator-inlong/issues) number, e.g. \`[INLONG-123]\`" >> $GITHUB_STEP_SUMMARY
+            echo "> - **Component** should be replaced by the InLong component name, e.g. \`[INLONG-123][Manager]\`" >> $GITHUB_STEP_SUMMARY

Review Comment:
   ![image](https://user-images.githubusercontent.com/49934421/173733187-fa97bf15-0016-46ae-b505-35ea6d5731c2.png)
   



-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] shink commented on a diff in pull request #4637: [INLONG-4636][CI] Add check PR title workflow

Posted by GitBox <gi...@apache.org>.
shink commented on code in PR #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637#discussion_r897507035


##########
.github/workflows/ci_check_pr_title.yml:
##########
@@ -38,13 +38,17 @@ jobs:
       - name: Check title
         if: ${{ github.event_name == 'pull_request_target' }}
         run: |
-          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\].*$ ]]; then
+          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\]\[[a-zA-Z]+\].*$ ]]; then
             echo "This pull request title is not valid."
-            echo "The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123]."
+            echo "Title Example: [INLONG-XYZ][Component] Title of the pull request"
+            echo "XYZ should be replaced by the actual GitHub Issue number, e.g. [INLONG-123]"
+            echo "Component should be replaced by the InLong component name, e.g. [INLONG-123][Manager]"
           
             # add a job summary
             echo "## This pull request title is not valid! :bug:" >> $GITHUB_STEP_SUMMARY
-            echo "The correct title should start with \`[WIP]\` or \`[INLONG-xxx]\`, where **xxx** is the issue number, e.g. \`[INLONG-123]\`." >> $GITHUB_STEP_SUMMARY
+            echo "Title Example: \`[INLONG-XYZ][Component] Title of the pull request\`" >> $GITHUB_STEP_SUMMARY
+            echo "> - **XYZ** should be replaced by the actual [GitHub Issue](https://github.com/apache/incubator-inlong/issues) number, e.g. \`[INLONG-123]\`" >> $GITHUB_STEP_SUMMARY
+            echo "> - **Component** should be replaced by the InLong component name, e.g. \`[INLONG-123][Manager]\`" >> $GITHUB_STEP_SUMMARY

Review Comment:
   @dockerzhang Done.



##########
.github/workflows/ci_check_pr_title.yml:
##########
@@ -38,13 +38,17 @@ jobs:
       - name: Check title
         if: ${{ github.event_name == 'pull_request_target' }}
         run: |
-          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\].*$ ]]; then
+          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\]\[[a-zA-Z]+\].*$ ]]; then
             echo "This pull request title is not valid."
-            echo "The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123]."
+            echo "Title Example: [INLONG-XYZ][Component] Title of the pull request"
+            echo "XYZ should be replaced by the actual GitHub Issue number, e.g. [INLONG-123]"
+            echo "Component should be replaced by the InLong component name, e.g. [INLONG-123][Manager]"
           
             # add a job summary
             echo "## This pull request title is not valid! :bug:" >> $GITHUB_STEP_SUMMARY
-            echo "The correct title should start with \`[WIP]\` or \`[INLONG-xxx]\`, where **xxx** is the issue number, e.g. \`[INLONG-123]\`." >> $GITHUB_STEP_SUMMARY
+            echo "Title Example: \`[INLONG-XYZ][Component] Title of the pull request\`" >> $GITHUB_STEP_SUMMARY
+            echo "> - **XYZ** should be replaced by the actual [GitHub Issue](https://github.com/apache/incubator-inlong/issues) number, e.g. \`[INLONG-123]\`" >> $GITHUB_STEP_SUMMARY
+            echo "> - **Component** should be replaced by the InLong component name, e.g. \`[INLONG-123][Manager]\`" >> $GITHUB_STEP_SUMMARY

Review Comment:
   @dockerzhang Done. PTAL.



-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] shink commented on a diff in pull request #4637: [INLONG-4636][CI] Add check PR title workflow

Posted by GitBox <gi...@apache.org>.
shink commented on code in PR #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637#discussion_r895029493


##########
.github/workflows/ci_check_pr_title.yaml:
##########
@@ -0,0 +1,46 @@
+#
+# 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: InLong Check Pull Request Title
+
+on:
+  pull_request_target:
+    types:
+      - opened
+      - reopened
+      - edited
+      - synchronize
+
+jobs:
+  check:
+    name: Check pull request title
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      # The correct title should start with [WIP] or [INLONG-xxx],
+      # where xxx is the issue number, e.g. [INLONG-123].
+      - name: Check title
+        run: |
+          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\].*$ ]]; then
+            echo "This pull request title is not valid."
+            echo "The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123]."
+            exit 1
+          fi
+        env:
+          PR_TITLE: ${{ github.event.pull_request.title }}

Review Comment:
   > The correct title should start with `[WIP]` or `[INLONG-xxx]`, where xxx is the issue number, e.g. `[INLONG-123]`.
   
   Is it OK?
   



-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] shink commented on a diff in pull request #4637: [INLONG-4636][CI] Add check PR title workflow

Posted by GitBox <gi...@apache.org>.
shink commented on code in PR #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637#discussion_r895101014


##########
.github/workflows/ci_check_pr_title.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: InLong Check Pull Request Title
+
+on:
+  pull_request_target:
+    types:
+      - opened
+      - reopened
+      - edited
+      - synchronize
+
+jobs:
+  check:
+    name: Check pull request title
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      # The correct title should start with [WIP] or [INLONG-xxx],
+      # where xxx is the issue number, e.g. [INLONG-123].
+      - name: Check title
+        if: ${{ github.event_name == 'pull_request_target' }}
+        run: |
+          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\].*$ ]]; then
+            echo "This pull request title is not valid."
+            echo "The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123]."
+          
+            # add a job summary
+            echo "## This pull request title is not valid! :bug:" >> $GITHUB_STEP_SUMMARY
+            echo "The correct title should start with \`[WIP]\` or \`[INLONG-xxx]\`, where **xxx** is the issue number, e.g. \`[INLONG-123]\`." >> $GITHUB_STEP_SUMMARY

Review Comment:
   If the title is not valid, the job summary will be added.
   The doc is in markdown style.
   ![image](https://user-images.githubusercontent.com/49934421/173216172-9253e02e-b9a4-4075-b4e3-6a91a6d9a6b9.png)
   



-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] healchow merged pull request #4637: [INLONG-4636][CI] Add check PR title workflow

Posted by GitBox <gi...@apache.org>.
healchow merged PR #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637


-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] dockerzhang commented on a diff in pull request #4637: [INLONG-4636][CI] Add check PR title workflow

Posted by GitBox <gi...@apache.org>.
dockerzhang commented on code in PR #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637#discussion_r897449057


##########
.github/workflows/ci_check_pr_title.yaml:
##########
@@ -0,0 +1,46 @@
+#
+# 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: InLong Check Pull Request Title
+
+on:
+  pull_request_target:
+    types:
+      - opened
+      - reopened
+      - edited
+      - synchronize
+
+jobs:
+  check:
+    name: Check pull request title
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      # The correct title should start with [WIP] or [INLONG-xxx],
+      # where xxx is the issue number, e.g. [INLONG-123].
+      - name: Check title
+        run: |
+          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\].*$ ]]; then
+            echo "This pull request title is not valid."
+            echo "The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123]."
+            exit 1
+          fi
+        env:
+          PR_TITLE: ${{ github.event.pull_request.title }}

Review Comment:
   - Title Example: [INLONG-XYZ][Component] Title of the pull request
   
   *(The following *XYZ* should be replaced by the actual [GitHub Issue](https://github.com/apache/incubator-inlong/issues) number)*
   



-- 
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@inlong.apache.org

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


[GitHub] [incubator-inlong] shink commented on a diff in pull request #4637: [INLONG-4636][CI] Add check PR title workflow

Posted by GitBox <gi...@apache.org>.
shink commented on code in PR #4637:
URL: https://github.com/apache/incubator-inlong/pull/4637#discussion_r895125227


##########
.github/workflows/ci_check_pr_title.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: InLong Check Pull Request Title
+
+on:
+  pull_request_target:
+    types:
+      - opened
+      - reopened
+      - edited
+      - synchronize
+
+jobs:
+  check:
+    name: Check pull request title
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      # The correct title should start with [WIP] or [INLONG-xxx],
+      # where xxx is the issue number, e.g. [INLONG-123].
+      - name: Check title
+        if: ${{ github.event_name == 'pull_request_target' }}
+        run: |
+          if [[ ! "$PR_TITLE" =~ ^\[(WIP|INLONG-[0-9]+)\].*$ ]]; then
+            echo "This pull request title is not valid."
+            echo "The correct title should start with [WIP] or [INLONG-xxx], where xxx is the issue number, e.g. [INLONG-123]."
+          
+            # add a job summary
+            echo "## This pull request title is not valid! :bug:" >> $GITHUB_STEP_SUMMARY
+            echo "The correct title should start with \`[WIP]\` or \`[INLONG-xxx]\`, where **xxx** is the issue number, e.g. \`[INLONG-123]\`." >> $GITHUB_STEP_SUMMARY

Review Comment:
   See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary



-- 
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@inlong.apache.org

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