This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch ozone-2.1
in repository https://gitbox.apache.org/repos/asf/ozone.git

commit 76440793170a4de55044e78ee2b987e9b98fb08b
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Wed Mar 11 10:05:48 2026 +0100

    HDDS-14785. Remove PR comment commands (#9885)
    
    (cherry picked from commit 8157d4f1a23f3099b1365740584a9777b3605108)
---
 .github/ci.md                      |  7 ----
 .github/comment-commands/debug.sh  | 21 -----------
 .github/comment-commands/help.sh   | 27 --------------
 .github/comment-commands/label.sh  | 25 -------------
 .github/comment-commands/retest.sh | 75 --------------------------------------
 .github/process-comment.sh         | 56 ----------------------------
 .github/workflows/comments.yaml    | 33 -----------------
 7 files changed, 244 deletions(-)

diff --git a/.github/ci.md b/.github/ci.md
index 75b0ad38a9e..f354c7b80d0 100644
--- a/.github/ci.md
+++ b/.github/ci.md
@@ -76,13 +76,6 @@ If they don't match, it describes how to make the updates to 
include the changes
 ### close-stale-prs Workflow
 [This](./workflows/close-stale-prs.yml) workflow is scheduled each night at 
midnight and uses the [actions/stale](https://github.com/actions/stale) to 
automatically manage inactive PRs. It marks PRs as stale after 21 days of 
inactivity and closes them 7 days later. If a stale PR receives any updates or 
comments, the stale label is automatically removed.
 
-### comment-commands Workflow
-[This](./workflows/comments.yaml) workflow is triggered each time a comment is 
added/edited to a PR.  It checks to see if the body of the comment begins with 
one of the following strings and, if so, invokes the corresponding command.
-- /help : [Show](./comment-commands/help.sh) all the available comment commands
-- /label : [Add](./comment-commands/label.sh) new label to the issue: /label 
"label"
-- /retest : [Provide](./comment-commands/retest.sh) help on how to trigger new 
CI build
-
-
 ## Old/Deprecated Workflows
 The following workflows no longer run but still exist on the 
[actions](https://github.com/apache/ozone/actions) page for historical reasons:
 - [Build](https://github.com/apache/ozone/actions/workflows/main.yml)
diff --git a/.github/comment-commands/debug.sh 
b/.github/comment-commands/debug.sh
deleted file mode 100755
index 143b3ebf6d8..00000000000
--- a/.github/comment-commands/debug.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-# 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.
-
-#doc: Show current event json to debug problems
-
-echo "\`\`\`"
-cat "$GITHUB_EVENT_PATH"
-echo "\`\`\`"
diff --git a/.github/comment-commands/help.sh b/.github/comment-commands/help.sh
deleted file mode 100755
index 2e9bb0a010b..00000000000
--- a/.github/comment-commands/help.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-# 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.
-
-#doc: Show all the available comment commands
-DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
-echo "Available commands:"
-DOCTAG="#"
-DOCTAG="${DOCTAG}doc"
-for command in "$DIR"/*.sh; do
-  COMMAND_NAME="$(basename "$command" | sed 's/\.sh$//')"
-  if [ "$COMMAND_NAME" != "debug" ]; then
-    printf " * /**%s** %s\n" "$COMMAND_NAME" "$(grep $DOCTAG "$command" | sed 
"s/$DOCTAG//g")"
-  fi
-done
diff --git a/.github/comment-commands/label.sh 
b/.github/comment-commands/label.sh
deleted file mode 100755
index e8e0390dfd6..00000000000
--- a/.github/comment-commands/label.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env bash
-# 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.
-
-#doc: add new label to the issue: `/label <label>`
-LABEL="$1"
-URL="$(jq -r '.issue.url' "$GITHUB_EVENT_PATH")/labels"
-set +x #GITHUB_TOKEN
-curl -s -o /dev/null \
-  -X POST \
-  --data "$(jq --arg value "$LABEL" -n '{labels: [ $value ]}')" \
-  --header "authorization: Bearer $GITHUB_TOKEN" \
-  "$URL"
diff --git a/.github/comment-commands/retest.sh 
b/.github/comment-commands/retest.sh
deleted file mode 100755
index 2214264e9b2..00000000000
--- a/.github/comment-commands/retest.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env bash
-# 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.
-
-#doc: provide help on how to trigger new CI build
-
-# posting a new commit from this script does not trigger CI checks
-# 
https://help.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
-
-set -eu
-
-code='```'
-
-pr_url="$(jq -r '.issue.pull_request.url' "${GITHUB_EVENT_PATH}")"
-commenter="$(jq -r '.comment.user.login' "${GITHUB_EVENT_PATH}")"
-assoc="$(jq -r '.comment.author_association' "${GITHUB_EVENT_PATH}")"
-
-curl -LSs "${pr_url}" -o pull.tmp
-source_repo="$(jq -r '.head.repo.ssh_url' pull.tmp)"
-branch="$(jq -r '.head.ref' pull.tmp)"
-pr_owner="$(jq -r '.head.user.login' pull.tmp)"
-maintainer_can_modify="$(jq -r '.maintainer_can_modify' pull.tmp)"
-
-# PR owner
-# =>
-# has local branch, can simply push
-if [[ "${commenter}" == "${pr_owner}" ]]; then
-  cat <<-EOF
-To re-run CI checks, please follow these steps with the source branch checked 
out:
-${code}
-git commit --allow-empty -m 'trigger new CI check'
-git push
-${code}
-EOF
-
-# member AND modification allowed by PR author
-# OR
-# repo owner
-# =>
-# include steps to fetch branch
-elif [[ "${maintainer_can_modify}" == "true" ]] && [[ "${assoc}" == "MEMBER" 
]] || [[ "${assoc}" == "OWNER" ]]; then
-  cat <<-EOF
-To re-run CI checks, please follow these steps:
-${code}
-git fetch "${source_repo}" "${branch}"
-git checkout FETCH_HEAD
-git commit --allow-empty -m 'trigger new CI check'
-git push "${source_repo}" HEAD:"${branch}"
-${code}
-EOF
-
-# other folks
-# =>
-# ping author
-else
-  cat <<-EOF
-@${pr_owner} please trigger new CI check by following these steps:
-${code}
-git commit --allow-empty -m 'trigger new CI check'
-git push
-${code}
-EOF
-fi
diff --git a/.github/process-comment.sh b/.github/process-comment.sh
deleted file mode 100755
index e3b78b421ae..00000000000
--- a/.github/process-comment.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env bash
-# 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.
-
-set +x #don't show GITHUB_TOKEN
-
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
-BODY=$(jq -r .comment.body "$GITHUB_EVENT_PATH")
-LINES=$(printf "%s" "$BODY" | wc -l)
-if [ "$LINES" == "0" ]; then
-  if [[ "$BODY" == /* ]]; then
-    echo "Command $BODY is received"
-    COMMAND=$(echo "$BODY" | awk '{print $1}' | sed 's/\///')
-    ARGS=$(echo "$BODY" | cut -d ' ' -f2-)
-    if [ -f "$SCRIPT_DIR/comment-commands/$COMMAND.sh" ]; then
-      RESPONSE=$("$SCRIPT_DIR/comment-commands/$COMMAND.sh" "${ARGS[@]}")
-      EXIT_CODE=$?
-      if [[ $EXIT_CODE != 0 ]]; then
-        # shellcheck disable=SC2124
-        RESPONSE="> $BODY
-        
-Script execution has been failed with exit code $EXIT_CODE. Please check the 
output of the github action run to get more information.
-
-\`\`\`
-$RESPONSE
-\`\`\`
-"
-      fi
-    else
-      RESPONSE="No such command. \`$COMMAND\` 
$("$SCRIPT_DIR/comment-commands/help.sh")"
-    fi
-    if [ "$GITHUB_TOKEN" ]; then
-      set +x #do not display the GITHUB_TOKEN
-      COMMENTS_URL=$(jq -r .issue.comments_url "$GITHUB_EVENT_PATH")
-      curl -s \
-        --data "$(jq --arg body "$RESPONSE" -n '{body: $body}')" \
-        --header "authorization: Bearer $GITHUB_TOKEN" \
-        --header 'content-type: application/json' \
-        "$COMMENTS_URL"
-    else
-      echo "$RESPONSE"
-    fi
-  fi
-fi
diff --git a/.github/workflows/comments.yaml b/.github/workflows/comments.yaml
deleted file mode 100644
index d10b9475981..00000000000
--- a/.github/workflows/comments.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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: comment-commands
-
-on:
-  issue_comment:
-    types:
-      - created
-      - edited
-
-jobs:
-  process-comment:
-    name: check-comment
-    runs-on: ubuntu-24.04
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Execute process-comment script
-        run: ./.github/process-comment.sh
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


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

Reply via email to