Skip to content

Commit 562e9ab

Browse files
committed
Use body instead of description
1 parent 5ce53be commit 562e9ab

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/linear.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check for "linear" in pull request description
1+
name: Check for "linear" in pull request body
22

33
on:
44
pull_request:
@@ -7,25 +7,25 @@ on:
77
- edited
88

99
jobs:
10-
check_linear_in_pr_description:
10+
check_linear_in_pr_body:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Get pull request info
1414
id: pr-info
1515
run: |
16-
# Fetch the pull request description using GitHub's API
17-
pr_description=$(curl -s \
16+
# Fetch the pull request body using GitHub's API
17+
pr_body=$(curl -s \
1818
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
1919
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }} | jq -r .body)
2020
21-
echo "Pull Request Description: $pr_description"
22-
echo "::set-output name=description::$pr_description"
21+
echo "Pull Request Body: $pr_body"
22+
echo "::set-output name=body::$pr_body"
2323
24-
- name: Check for "linear" in the pull request description
24+
- name: Check for "linear" in the pull request body
2525
run: |
26-
if echo "${{ steps.pr-info.outputs.description }}" | tr -d '\n' | grep -qi "linear"; then
27-
echo "'linear' found in the pull request description."
26+
if echo "${{ steps.pr-info.outputs.body }}" | grep -iq "linear"; then
27+
echo "'linear' found in the pull request body."
2828
else
29-
echo "'linear' not found in the pull request description."
29+
echo "'linear' not found in the pull request body."
3030
exit 1
3131
fi

0 commit comments

Comments
 (0)