File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Linear in description
2+
3+ on :
4+ pull_request :
5+ types :
6+ - opened
7+ - edited
8+
9+ jobs :
10+ check_linear_in_pr_description :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Get pull request info
14+ id : pr-info
15+ run : |
16+ # Fetch the pull request description using GitHub's API
17+ pr_description=$(curl -s \
18+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
19+ https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }} | jq -r .body)
20+
21+ echo "Pull Request Description: $pr_description"
22+ echo "::set-output name=description::$pr_description"
23+
24+ - name : Check for linear in PR description
25+ run : |
26+ if echo "${{ steps.pr-info.outputs.description }}" | grep -qi "linear"; then
27+ echo "'linear' found in the pull request description."
28+ else
29+ echo "'linear' not found in the pull request description."
30+ exit 1
31+ fi
You can’t perform that action at this time.
0 commit comments