Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rsworkspace/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions rsworkspace/crates/trogon-source-linear/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ trogon-std = { workspace = true }

[dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
tower = "0.5"
tracing-subscriber = { workspace = true }
trogon-nats = { workspace = true, features = ["test-support"] }
trogon-std = { workspace = true, features = ["test-support"] }
testcontainers-modules = { version = "0.8", features = ["nats"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
Expand Down
2 changes: 2 additions & 0 deletions rsworkspace/crates/trogon-source-linear/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ pub const DEFAULT_TIMESTAMP_TOLERANCE_SECS: u64 = 60;
/// Default JetStream ACK timeout: 10 seconds.
pub const DEFAULT_NATS_ACK_TIMEOUT_MS: u64 = 10_000;
pub const DEFAULT_NATS_CONNECT_TIMEOUT: Duration = Duration::from_secs(10);

pub const NATS_HEADER_REJECT_REASON: &str = "X-Linear-Reject-Reason";
4 changes: 4 additions & 0 deletions rsworkspace/crates/trogon-source-linear/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
//! - **Headers**: `Nats-Msg-Id` (set to Linear's `webhookId` for dedup)
//! - **Payload**: raw JSON body from Linear
//!
//! Payloads that pass signature verification but fail validation (invalid JSON,
//! missing/invalid `type` or `action`, stale timestamp) are published to
//! `{LINEAR_SUBJECT_PREFIX}.unroutable` with an `X-Linear-Reject-Reason` header.
//!
//! ## Configuration (env vars)
//!
//! | Variable | Default | Description |
Expand Down
Loading
Loading