mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
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:
14
.github/workflows/pull-request.yml
vendored
14
.github/workflows/pull-request.yml
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user