chore: disable comments from known bots

This commit is contained in:
Mrugesh Mohapatra
2023-11-08 11:18:46 +05:30
parent bcd6892ecd
commit 6e441607a5

View File

@@ -20,7 +20,7 @@ jobs:
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
COMMITS_URL="https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/commits"
IS_GITHUB_COMMIT=$(curl --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "$COMMITS_URL" | jq '[.[] | .commit.committer.name] | any(.[]; . == "GitHub")')
IS_GITHUB_COMMIT=$(curl --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "$COMMITS_URL" | jq '[.[] | select(.commit.committer.name == "GitHub" and (.commit.author.name == "renovate[bot]" or .commit.author.name == "camperbot"))] | any')
if [ "$IS_GITHUB_COMMIT" = "true" ]; then
# Set variable for next task