Skip to main content

Scenario

When features move to “Done” in Linear, your marketing team needs release notes, a blog post draft, and social media copy. This job queries completed issues from recent cycles via GraphQL, extracts feature names and descriptions, then chains three Mavera Generate calls for release notes, a blog draft, and social copy. Flow: Linear GraphQL (completedIssues query) → extract features → Mavera POST /api/v1/generations (release notes) → POST /api/v1/generations (blog) → POST /api/v1/generations (social)

Code

Example Output

Error Handling

Linear allows 5,000 req/hr and 250K complexity points/hr. The code reads Retry-After on 429 responses. Nested queries with large first: values consume more points.
The gte: "-P14D" ISO 8601 duration filters to the last 14 days. If no issues match, extend the window or verify your team’s workflow states include a “completed” type.
Issues without descriptions produce thinner release notes. Filter to description length > 50 chars for higher quality, or enrich from linked PRs via the attachments connection.