Skip to content

Comments

Linear issue release tagging#917

Merged
msukkari merged 3 commits intomainfrom
cursor/SOU-535-linear-issue-release-tagging-6c95
Feb 21, 2026
Merged

Linear issue release tagging#917
msukkari merged 3 commits intomainfrom
cursor/SOU-535-linear-issue-release-tagging-6c95

Conversation

@msukkari
Copy link
Contributor

@msukkari msukkari commented Feb 21, 2026

Adds a GitHub Action to automatically tag Linear issues with the release version when a new release is published.

The current workflow closes Linear issues upon PR merge, but the associated changes are not live until a release. This PR introduces a mechanism to apply a release version tag to Linear issues, providing better visibility into when a fix or feature is actually deployed.


Linear Issue: SOU-535

Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features
    • Added automated workflow to tag Linear issues with release versions when new releases are published. The system extracts the version from release notes, identifies associated issues across pull requests, creates a release label, and automatically applies it to relevant issues for better tracking and organization.

This adds a new GitHub Actions workflow that runs after a successful
production release and automatically tags linked Linear issues with
the release version label.

Components:
- scripts/tagLinearIssuesWithRelease.mjs: Script that parses the
  changelog to find PR numbers, queries Linear API for issues linked
  via GitHub attachments, and adds a version label to those issues
- .github/workflows/tag-linear-issues.yml: Workflow that triggers
  after the release workflow completes and runs the tagging script

Required secrets:
- LINEAR_API_KEY: Linear API key with write access
- LINEAR_TEAM_ID: Linear team identifier (e.g., 'SOU')

Closes SOU-535

Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
@cursor
Copy link

cursor bot commented Feb 21, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new GitHub Actions workflow that runs after the production release, extracts the released version from CHANGELOG.md, and runs a Node.js script which queries the Linear GraphQL API to find issues referenced by PRs for that version and applies a v label to them.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
​.github/workflows/tag-linear-issues.yml
New workflow triggered on successful "Release Sourcebot (Production)". Checks out repo, sets up Node 24, extracts version from CHANGELOG.md, exposes it as output, and runs the tagging script with LINEAR_API_KEY and LINEAR_TEAM_ID secrets.
Changelog
CHANGELOG.md
Added an "Added" entry under Unreleased documenting the automatic Linear issue tagging workflow.
Release Tagging Implementation
scripts/tagLinearIssuesWithRelease.mjs
New ESM Node script that validates env vars, parses CHANGELOG.md to collect PR numbers for the version, queries Linear via GraphQL to map PR URLs to issues, finds/creates a v<version> label for the team, and applies the label to each discovered issue (deduplicating and skipping already-labeled issues).

Sequence Diagram(s)

sequenceDiagram
    participant GA as GitHub Actions
    participant Changelog as CHANGELOG.md
    participant Script as Tagging Script
    participant Linear as Linear GraphQL API

    GA->>Changelog: Extract version
    Changelog-->>GA: Return version
    GA->>Script: Run script with version & creds
    Script->>Changelog: Parse PR numbers for version
    Changelog-->>Script: Return PR list
    Script->>Linear: Query attachments for each PR URL
    Linear-->>Script: Return linked issues
    Script->>Script: Deduplicate issues
    Script->>Linear: Get team ID by key
    Linear-->>Script: Return team ID
    Script->>Linear: Find or create v<version> label
    Linear-->>Script: Return label ID
    Script->>Linear: Add label to each issue
    Linear-->>Script: Confirm updates
    Script-->>GA: Report completion
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/SOU-535-linear-issue-release-tagging-6c95

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@msukkari msukkari marked this pull request as ready for review February 21, 2026 02:37
@github-actions

This comment has been minimized.

Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
@msukkari msukkari merged commit 6fd5b69 into main Feb 21, 2026
8 checks passed
@msukkari msukkari deleted the cursor/SOU-535-linear-issue-release-tagging-6c95 branch February 21, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants