Skip to content

ci(embedded): Patrol E2E with local mock auth and CI matrix #147

ci(embedded): Patrol E2E with local mock auth and CI matrix

ci(embedded): Patrol E2E with local mock auth and CI matrix #147

name: "onPullRequestUpdated"
on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- master
jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get Pull Request Description
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pr_metadata=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}")
# Extract the description (body field)
DESCRIPTION=$(echo "$pr_metadata" | jq -r '.body')
if [ "$DESCRIPTION" != "null" ]; then
echo "Pull Request Description: $DESCRIPTION"
else
echo "No description provided in the pull request. The 'release/next' branch must provide a description for the correct generation of the 'CHANGELOG.md' file."
exit 1
fi