ci: Linear <-> GitHub PR sync automation#1441
Open
tcharchian wants to merge 4 commits into
Open
Conversation
Adds a custom GitHub Action that mirrors every pull request (including external fork PRs) into Linear and keeps issues in sync with the PR lifecycle: - opened: parent issue in the GON team Triage, first-time-contributor label, per-reviewer "review needed" sub-issues, and auto-requests the reviewers on the PR (author is excluded / swapped) - milestoned: moves parent + sub-issues into the "Upgrade <milestone>" release project (created if missing) - review approved: reviewer's sub-issue -> Done - merged: parent -> "Merged. Ready for testing"; each review sub-issue -> Done only if that reviewer approved, else "Not done"; creates a Q&A "Testing" sub-issue (Todo, assigned to QA owner) - closed by a reviewer: parent Done, their sub Done, other Cancelled - closed by anyone else: parent Cancelled, review subs "Not done" - merged/approved without a milestone: parked in an "unsorted" project Config via LINEAR_API_KEY secret + repository variables; identities, states, projects and labels are resolved by name at runtime. Co-authored-by: Cursor <cursoragent@cursor.com>
Previously review sub-issues were set to "Not done" when a PR was closed unmerged by someone other than a reviewer; make them "Cancelled" instead (the parent is already Cancelled). "Not done" remains for the merged-but- not-approved case. Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Tania Charchian <tatiana.charchian@productscience.ai>
Signed-off-by: Tania Charchian <tatiana.charchian@productscience.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a custom GitHub Action that mirrors every pull request (including PRs from external forks) into Linear and keeps issues in sync with the PR lifecycle. Internal Linear comments stay private (never pushed to GitHub).
"<title> — review needed"sub-issues (Backlog); auto-requests reviewers on the PR (author excluded/swapped).Upgrade <milestone>release project (created if missing)."<title> — Testing"sub-issue (Todo, assigned to QA owner).Implemented with
pull_request_target(+pull_request_review) so it works for fork PRs; PR code is never checked out or executed. Identities, states, projects and labels are resolved by name at runtime.Files:
.github/workflows/linear-pr-sync.yml.github/scripts/linear-pr-sync/(script + README)docs/linear-github-sync.mdRequired setup before this works
LINEAR_API_KEY.LINEAR_TEAM_KEY=GONandLINEAR_REVIEWERS(GitHub↔Linear mapping).main, so this must be merged to take effect.Test plan