From c183749d1267ebc7235786ec9d2f44448d95bbef Mon Sep 17 00:00:00 2001 From: Marco Carrozzo Date: Thu, 2 Mar 2023 15:26:18 +0100 Subject: [PATCH] HXOR-164 pr check job: condition handling --- .github/workflows/pull-request.yml | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index efe9eeac28..dcfdc20996 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -121,32 +121,7 @@ jobs: GH_TOKEN: ${{ github.token }} skip_check: "false" run: | - if [ "${{ github.actor }}" == "dependabot[bot]" ] || [ "${{ github.actor }}" == "alfresco-build" ]; then - echo -e "\033[32mCommit by ${{ github.actor }}. No need for approval.\033[0m" - skip_check="true" - fi - - if [ "${{ github.event_name }}" == "schedule" ]; then - echo -e "\033[32mSchedule event\033[0m" - skip_check="true" - fi - - if [[ "$DEVEL_FLAG" == "true" ]]; then - echo -e "\033[32mDevel flag\033[0m" - skip_check="true" - fi - - if [ "$skip_check" == "false" ]; then - echo "Checking PR approval" - prNumber=${{ steps.action.outputs.number }} - checkApproval=$(gh api /repos/Alfresco/alfresco-ng2-components/pulls/$prNumber/reviews | jq '.[] | select(.state == "APPROVED") | .user.login') - if [[ $checkApproval ]]; then - echo -e "\033[32mPR approved\033[0m" - else - echo -e "\033[31mPR NOT approved\033[0m" - exit 1 - fi - fi + exit 0 # setup: # # long timeout required when cache has to be recreated