chore: Include 'Bearer' in authorization header documentation #60
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: validate description | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, edited] | |
jobs: | |
validate_description: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out workflow tooling repository | |
uses: actions/checkout@v4 | |
with: | |
repository: devrev/global-gh-tools | |
path: .global-checks-tooling | |
- name: Fetch latest PR description using GitHub REST API | |
id: fetch_pr | |
run: | | |
sudo apt-get install jq | |
echo "Fetching latest PR description using REST API" | |
pr_number="${{ github.event.pull_request.number }}" | |
repo="${{ github.repository }}" | |
api_url="https://api.github.com/repos/$repo/pulls/$pr_number" | |
pr_body=$(curl -sSL \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
"$api_url" | jq -r '.body') | |
echo "$pr_body" > pr_body.txt | |
- name: Check PR description for work item link | |
run: | | |
echo "Checking PR description for work item link" | |
python .global-checks-tooling/checks/check_pr_description.py "$(cat pr_body.txt)" |