Skip to content

Commit

Permalink
CI - Enforce Linear issue on pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunnaha committed Oct 7, 2024
1 parent 56f3286 commit 4541a2f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/require-linear-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Require Linear Issue in Pull Request

on:
workflow_dispatch:
pull_request:
branches:
- main
types: [opened, reopened]

jobs:
require-linear-issue:
runs-on: ubuntu-latest
steps:
- name: Find the Linear Issue
id: find-issue
uses: ctriolo/action-find-linear-issue@v0.60
with:
linear-api-key: ${{ secrets.LINEAR_API_KEY }}

- name: Require Linear Issue
run: |
if [ -z "${{ steps.find-issue.outputs.linear-issue-identifier }}" ]; then
echo "Please add a Linear ID to the title of the Pull Request. Using the Linear branch name would have done this automatically."
exit 1
fi

0 comments on commit 4541a2f

Please sign in to comment.