Overview
Magpie integrates with self-hosted Plane to automatically create and update issues for each task. When configured, the pipeline:- Creates a Plane issue at the start of each run
- Updates the issue status on completion (
doneorin_progress) - Adds a comment with the PR URL when available
Configuration Structure
crates/magpie-core/src/plane.rs:5-11
Environment Variables
Self-hosted Plane instance URL (without trailing slash).Example:
Plane API key for authentication.How to Get:
- Log in to your Plane instance
- Navigate to Settings → API Tokens
- Create a new token
- Copy and set as env var
Workspace slug (visible in Plane URLs).Example:How to Find: Look at your Plane URL:
https://plane.company.com/<workspace-slug>/projects/...Project ID for auto-created issues.Example:How to Find: Navigate to a project in Plane and look at the URL or use the Plane API to list projects.
PlaneClient API
ThePlaneClient provides three main operations:
Create Issue
crates/magpie-core/src/plane.rs:42-65
Update Issue
crates/magpie-core/src/plane.rs:68-80
Add Comment
crates/magpie-core/src/plane.rs:83-104
IssueUpdate Fields
Issue state (
done, in_progress, todo, etc.).Example:HTML-formatted issue description.Example:
Issue priority (
high, medium, low, etc.).Example:crates/magpie-core/src/plane.rs:117-126
Pipeline Integration
When Plane is configured, the pipeline automatically: 1. Create issue at startcrates/magpie-core/src/pipeline.rs:914-936
2. Update issue on completion
crates/magpie-core/src/pipeline.rs:1194-1204
3. Add PR comment
crates/magpie-core/src/pipeline.rs:1206-1210
Example Configurations
Minimal Setup
Production Setup
Error Handling
All Plane operations are non-blocking. If Plane API calls fail, the pipeline continues and logs a warning:crates/magpie-core/src/pipeline.rs:918-932
API Endpoints
ThePlaneClient uses these Plane API endpoints:
Work Items
Comments
crates/magpie-core/src/plane.rs:106-113
Troubleshooting
401 Unauthorized
Cause: Invalid API key. Fix: Verify yourPLANE_API_KEY is correct and has not expired.
404 Not Found
Cause: Invalid workspace slug or project ID. Fix: Check the URL structure in your Plane instance and verifyPLANE_WORKSPACE_SLUG and PLANE_PROJECT_ID.
Network Timeout
Cause: Plane instance is unreachable or slow. Fix: Check yourPLANE_BASE_URL and ensure the Plane instance is accessible from your Magpie deployment.
Issues Not Appearing
Cause: Pipeline logs a warning but doesn’t fail. Fix: Check the Magpie logs forfailed to create Plane issue warnings. Verify all four Plane env vars are set correctly.
Related Documentation
- Pipeline Configuration — Core pipeline settings
- Environment Variables — Complete env var reference