This guide explains how to integrate the Linear-Slack workflows into your repository.
Organization has already configured the following secrets:
LINEAR_API_KEYSLACK_RELEASE_CHANGELOG_WEBHOOKGITHUB_TOKEN- Automatically provided by GitHub Actions (no setup needed)
Copy the example workflow files from the examples/ directory to your repository:
# In your repository
mkdir -p .github/workflows
# Copy the PR opened workflow
cp path/to/github-actions/examples/linear-pr-opened.yml .github/workflows/
# Copy the PR merged workflow
cp path/to/github-actions/examples/linear-pr-merged.yml .github/workflows/Adjust the workflow parameters based on your needs:
with:
base-branch: dev # Branch where PRs are created from
environment: production # Show as "production" in Slack
update-linear-status: true # Mark tickets as Donewith:
base-branch: dev
environment: dev
update-linear-status: false # Don't mark as Done until productiongit add .github/workflows/linear-*.yml
git commit -m "Add Linear-Slack integration workflows"
git push-
Create a branch from
devwith a commit containing a Linear ticket ID:git checkout dev git pull git checkout -b test/dev-123-test-integration git commit --allow-empty -m "test: DEV-123 test integration" git push -u origin test/dev-123-test-integration -
Open a PR against
main -
Check that:
- Slack notification was sent
- PR comment was added with ticket list
- GitHub Actions workflow succeeded
- Merge the test PR to
main - Check that:
- Slack "Tickets Released" notification was sent
- Linear ticket status changed to "Done" (if enabled)
- GitHub Actions workflow succeeded
This integration assumes the following branch strategy:
dev (development) → main (production)
- Developers create branches from
dev - PRs are opened against
main(promoting dev to production) - When PR is merged to
main, tickets are released
If your branch strategy is different, adjust the base-branch parameter accordingly.
Branches: dev → main
PR Target: main
Base Branch: dev
Update Status: true (only on main)
# .github/workflows/linear-pr-opened.yml
on:
pull_request:
branches: ["main"]
with:
base-branch: dev
environment: production# .github/workflows/linear-pr-merged.yml
on:
push:
branches: ["main"]
with:
base-branch: dev
environment: production
update-linear-status: true# For staging deployments (don't mark Done)
on:
push:
branches: ["staging"]
with:
base-branch: dev
environment: staging
update-linear-status: false# For production deployments (mark Done)
on:
push:
branches: ["main"]
with:
base-branch: staging
environment: production
update-linear-status: trueIf you work directly from feature branches to main:
with:
base-branch: main # Compare against main itself
environment: production
update-linear-status: trueProblem: Workflow doesn't run when PR is opened Solution:
- Check that workflow file is in
.github/workflows/directory - Verify the file has
.ymlor.yamlextension - Ensure the
on.pull_request.branchesmatches your PR target branch
Problem: Error: Input required and not supplied: LINEAR_API_KEY
Solution:
- Verify secrets are created at organization level (not repository level)
- Check that your repository has access to organization secrets
- Ensure secret names match exactly (case-sensitive)
Problem: Workflow runs but says "No tickets found" Solution:
- Check commit messages contain ticket IDs in correct format (
DEV-123oracc_456) - Verify the
base-branchparameter points to the correct branch - Ensure git refs are being fetched correctly
Problem: Tickets not marked as "Done" Solution:
- Verify
update-linear-status: trueis set - Check that Linear API key has permission to update issues
- Confirm "Done" state exists in your Linear workspace
- Check workflow logs for specific error messages
Problem: No message appears in Slack channel Solution:
-
Verify Slack webhook URL is correct
-
Check that webhook has permission to post to the target channel
-
Test webhook manually using curl:
curl -X POST -H 'Content-Type: application/json' \ -d '{"text":"Test message"}' \ YOUR_WEBHOOK_URL
After successful integration:
- Train your team: Make sure developers include Linear ticket IDs in commits
- Monitor notifications: Watch Slack channel to verify notifications are working
- Adjust as needed: Fine-tune the
base-branchandenvironmentparameters - Roll out to other repos: Repeat this process for other repositories in your organization
For issues or questions:
- Check the main README.md for detailed documentation
- Review GitHub Actions logs for error messages
- Contact the DevOps team for assistance