Overview
Connect your Linear workspace to:- Import issues as bounties
- Sync issue metadata (title, description, status)
- Post automatic comments on Linear issues when bounties are created or updated
- Filter and browse Linear issues directly in Bounty
Prerequisites
- A Linear workspace with admin access
- Linear OAuth application credentials
OAuth Setup
Create Linear OAuth Application
Visit the Linear Applications page and create a new OAuth application.Configure the following:
- Application name: Your Bounty instance name
- Callback URL:
https://your-domain.com/api/auth/callback/linear - Scopes:
read,write(for issues and comments)
Get Client Credentials
After creating the application, Linear provides:
- Client ID
- Client Secret
Connecting Your Workspace
Once OAuth is configured, users can connect their Linear workspace:Authorize Access
Grant Bounty permission to:
- Read issues and projects
- Create comments on issues
- Access workspace metadata
Token Management
Bounty automatically handles Linear OAuth token refresh:- Access tokens expire after a set period (typically 10 hours)
- Refresh tokens are used to obtain new access tokens automatically
- Tokens are refreshed 5 minutes before expiration
If a refresh fails, users will need to reconnect their Linear account through the OAuth flow.
Working with Issues
Fetching Issues
API endpoint:linear.getIssues
Retrieve issues with optional filters:
Get Single Issue
API endpoint:linear.getIssue
Creating Bounties from Issues
API endpoint:linear.getBountyDataFromIssue
Pre-fill bounty data from a Linear issue:
Automatic Comments
When bounty events occur, Bounty automatically posts comments to linked Linear issues.Bounty Created
Posted when a bounty is first created:Bounty Funded
Posted when payment is received:Submission Received
Posted when a contributor submits work:Bounty Completed
Posted when a bounty is awarded:Workspace Information
Get Workspaces
API endpoint:linear.getWorkspaces
Retrieve connected workspaces for the active organization:
Get Teams
API endpoint:linear.getTeams
Get Workflow States
API endpoint:linear.getWorkflowStates
Get Projects
API endpoint:linear.getProjects
Disconnecting Linear
To disconnect a Linear workspace:- Delete the workspace connection record
- Remove OAuth tokens if no other workspaces are connected
- Preserve existing bounties (they lose Linear sync but remain accessible)
Rate Limiting
Linear API operations are rate-limited per organization:- Read operations: Scoped to
linear:readrate limit - Write operations (comments): Scoped to
linear:commentrate limit - Create operations: Scoped to
linear:createrate limit
Troubleshooting
”Linear account not connected”
Solution: User needs to connect their Linear account via OAuth:- Go to organization settings
- Click “Connect Linear”
- Authorize access on Linear
”No access token available”
Cause: OAuth token was invalidated or expired without a refresh token. Solution: Reconnect Linear through the OAuth flow.”Failed to refresh Linear token”
Causes:- Refresh token expired
- Linear OAuth app credentials changed
- User revoked access in Linear settings
- Check
LINEAR_CLIENT_IDandLINEAR_CLIENT_SECRETare correct - Reconnect the workspace through OAuth
Comments Not Posting
Checklist:- Ensure Linear OAuth app has
writescope - Verify the
linearIssueIdis valid - Check that the user’s access token is valid
- Confirm the issue exists and is accessible
API Reference
getWorkspaces
Returns all Linear workspaces connected to the active organization.
Returns: { workspaces: Array<{ id, name, key, url }> }
getConnectionStatus
Check if Linear is connected for the active organization.
Returns: { connected: boolean, workspace: WorkspaceInfo | null }
getIssues
Input: { filters?: {...}, pagination?: {...} }
Returns: { issues: Issue[], hasNextPage: boolean, endCursor: string }
getIssue
Input: { issueId: string }
Returns: { issue: Issue }
postComment
Input: Discriminated union based on commentType:
bountyCreatedbountyFundedsubmissionReceivedbountyCompleted
{ success: boolean, commentId: string | null }
disconnect
Input: { workspaceId: string }
Requires: Organization owner role
Returns: { success: boolean }
syncWorkspace
Called automatically after OAuth. Fetches workspace info and creates the connection record.
Returns: { success: boolean, workspace: WorkspaceInfo | null }