HXOR-196 - get pr number change (#8411)

* check new action

* check new action

* check new action

* check new action

* check new action

* check new action

* check new action

* check new action

* get PR number

* get PR number

* get PR number

* get PR number

* get PR number

* get PR number

* get PR number

* final check

* final check

* use external action from build tool

* check new action

* use sha commit instead of ref number

* [ci:force]

* [ci:force]

* [ci:force]

* fix
This commit is contained in:
Maurizio Cacace
2023-03-28 08:54:54 +02:00
committed by GitHub
parent a61658eadf
commit 4d817e5762
2 changed files with 11 additions and 5 deletions

View File

@@ -119,7 +119,6 @@ jobs:
exit 0
else
git fetch --all
echo "$BRANCH_NAME"
message=$(git log --format=%B -n 1 origin/$BRANCH_NAME)
echo "COMMIT_MESSAGE=$message" >> $GITHUB_ENV
export COMMIT_MESSAGE=$message
@@ -131,11 +130,17 @@ jobs:
fi
- name: Get PR number
id: action
if: ${{ github.event_name != 'schedule' }}
uses: kamatama41/get-pr-number-action@5c77b38a1b4974ebf8a9521a689f38a5898eadd6
id: action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: show pr number
shell: bash
run: |
echo "PR: ${{ steps.action.outputs.number }}"
- name: check if pr is approved
env:
DEVEL_FLAG: ${{ inputs.devel }}
@@ -166,7 +171,8 @@ jobs:
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')
echo "PR: $prNumber"
checkApproval=$(gh api /repos/$GITHUB_REPOSITORY/pulls/$prNumber/reviews | jq '.[] | select(.state == "APPROVED") | .user.login')
if [[ $checkApproval ]]; then
echo -e "\033[32mPR approved\033[0m"
else

View File

@@ -178,7 +178,7 @@ jobs:
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: check PR number
id: action
uses: kamatama41/get-pr-number-action@v0
uses: kamatama41/get-pr-number-action@5c77b38a1b4974ebf8a9521a689f38a5898eadd6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: save PR number