Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/linear.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check for "linear" in pull request body

on:
pull_request:
types:
- opened
- edited

jobs:
check_linear_in_pr_body:
runs-on: ubuntu-latest
steps:
- name: Check for linked issue in pull request body
run: |
pr_body=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }} | jq -r .body)

echo "Pull Request Body: $pr_body"

if echo "$pr_body" | grep -iE "CNCT|DASH"; then
echo "Linked issue found in the pull request body."
else
echo "No linked issue found in the pull request body."
exit 1
fi
Loading