From baab460ec6286bdc0189d7292dacf562cd84d603 Mon Sep 17 00:00:00 2001 From: Venkatesh K Date: Fri, 6 May 2022 10:45:27 +0530 Subject: [PATCH] CORTX-30785: Fixing the Alex bug Problem: Alex's Github Action is fails with an error "reviewdog: PullRequest needs 'git' command: failed to run 'git rev-parse --show-prefix'" Solution: Changed the permissions of the directory where the target repository is checkeout in the workflow of GitHub Actions. Signed-off-by: Venkatesh K --- .github/workflows/alex_reviewdog.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/alex_reviewdog.yml b/.github/workflows/alex_reviewdog.yml index f076dfbbc..2bbe476c9 100644 --- a/.github/workflows/alex_reviewdog.yml +++ b/.github/workflows/alex_reviewdog.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates +# Copyright (c) 2021 Seagate Technology LLC and/or its Affiliates # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published @@ -22,7 +22,7 @@ on: # Trigger the workflow on pull request labeled as cla-signed # and synchronize for the main branch pull_request: - types: [ labeled, synchronize ] + types: [ opened, synchronize ] branches: - main # Trigger the workflow on demand @@ -31,13 +31,19 @@ jobs: # Let's start the alex to scan alex: name: Alex report - if: ${{ github.event.label.name == 'cla-signed' || github.event.action == 'synchronize' }} + #if: ${{ github.event.label.name == 'alex' || github.event.action == 'synchronize' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: Seagate/action-alex@v1 + + - name: "Enable the permissions" + run: | + sudo chown -R root:root $GITHUB_WORKSPACE + + - uses: seagate/action-alex@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} filter_mode: added reporter: github-pr-review - fail_on_error: false + fail_on_error: true + level: warning