Skip to content

Poll Linear and Sentry issues to fire automations (#1588) - #1604

Merged
currentbits merged 10 commits into
mainfrom
coder/automation-triggers-inbound-webhooks-lin-4917ce
Oct 12, 2026
Merged

currentbits merged 10 commits into
mainfrom
coder/automation-triggers-inbound-webhooks-lin-4917ce

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Automations can now fire when Linear creates or moves an issue, or when Sentry opens a new grouped issue. The desktop app still has no public URL, so this rides the existing 60s poller instead of a webhook relay. Closes #1588.

Changes

  • When picker adds Linear (issue created / status changed) and Sentry (new grouped issue). Status skips the birth span so creating an issue does not also fire status-changed.
  • Settings → Git stores a sealed Sentry auth token next to the Linear key (SENTRY_AUTH_TOKEN still wins).
  • Linear and Sentry share GitHub's poll rules: first tick is a baseline, matches batch into one run, a pending run skips the next tick, fetch errors write a prefixed lastError and do not trip consecutiveFailures.

Verification

  • Electron trigger / Linear / Sentry / issues / secrets: 104/104
  • Renderer automations + AutomationsView: 27/27
  • Settings modal: 88/88
  • tsc --noEmit and IPC preload check: clean
  • Whole-branch review: ready to merge (no Critical/Important)
  • Not tested against a live Linear workspace or a live Sentry project. Full npm test on this fork point also hit unrelated renderer timeouts and pre-existing Codex/memory failures in files this branch does not touch.

Notes for reviewers

  • No relay, no tunnel, sentry.io only. Generic inbound webhooks and numeric Sentry spikes stay out of scope.
  • Sentry environment is pasted unquoted into is:unresolved environment:…. The team filter matches team.key, not the display name.
  • The form nulls filters that do not apply to the selected event, so a Linear team cannot leak onto a later Sentry create.

cursor-grok-4.6 via Solenta

Made with Cursor

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T09:01:00.574152Z 44db33b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44db33bbf3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +412 to 413
if (auto.lastError && auto.lastError.startsWith(prefix)) {
patchAutomation(ctx.store, auto.id, { lastError: null });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear poll errors after changing trigger sources

When an automation previously failed under one source and is edited to another—for example, from Linear to Sentry—updateAutomation retains its lastError, while a successful poll here clears only errors beginning with the new source's prefix. The automation can therefore baseline and run successfully while permanently displaying the obsolete Linear trigger: ... error in AutomationsView; clear any recognized trigger-poll error when the trigger changes or when the new source polls successfully.

Useful? React with 👍 / 👎.

@currentbits
currentbits merged commit 2458856 into main Oct 12, 2026
6 checks passed
currentbits pushed a commit that referenced this pull request Oct 12, 2026
automation_create now echoes the #1604 trigger fields (team, status,
org, project, environment) and stored threads carry prLinks: []. Both
tests fail identically on main; they predate #1192.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
currentbits added a commit that referenced this pull request Oct 13, 2026
* Merge worktree coder/automations-natural-language-authoring-d-4d26e0: Automations: natural-language authoring (describe it in chat

* Merge worktree coder/p2-replay-fixture-provider-harness-recor-9dbd6f: P2: Replay-fixture provider harness: recorded CLI output thr

* Show before/after image changes in the Git pane (#1192)

Selecting a changed PNG/JPEG/GIF/WebP/BMP in the Git pane shows the old
and new image side by side, read from the exact refs the selected scope
diffs (HEAD, merge base or turn checkpoint vs working tree/checkpoint).
Each side carries its revision label, dimensions and file size, over a
checkerboard with Fit/100%/200% zoom; a missing side says added/deleted.

The host reads via cat-file and plain file reads (never the index),
sizes images from headers, and caps transfers at 8 MB and 25 MP with a
note fallback. Symlinks and paths outside the tree are refused. Staged
renames carry oldPath. SVG is deferred and keeps its text diff.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Update two stale electron test expectations red on main

automation_create now echoes the #1604 trigger fields (team, status,
org, project, environment) and stored threads carry prLinks: []. Both
tests fail identically on main; they predate #1192.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Warm the HtmlPage lazy chunk in htmlFence tests

A cold dynamic import() could outlast the three-tick flush on loaded CI
runners (ubuntu and windows, runs 38304474453), so the iframe assertion
saw nothing. Importing the module up front lets React.lazy resolve from
the module cache.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Willem <[email protected]>
Co-authored-by: Willem <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
currentbits pushed a commit that referenced this pull request Oct 19, 2026
automation_create now echoes the #1604 trigger fields (team, status,
org, project, environment) and stored threads carry prLinks: []. Both
tests fail identically on main; they predate #1192.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Automation triggers: inbound webhooks (Linear, Sentry, generic) via a relay

1 participant