Skip to content

Commit 0308af3

Browse files
authored
Merge branch 'main' into copilot/fix-31
2 parents efd2afc + ee345ce commit 0308af3

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Here is a very high-level overview of how Hooks works:
6666
status: "success",
6767
handler: "MyCustomHandler",
6868
payload_received: payload,
69-
timestamp: Time.now.iso8601
69+
timestamp: Time.now.utc.iso8601
7070
}
7171
end
7272
end
@@ -229,7 +229,7 @@ class HelloHandler < Hooks::Plugins::Handlers::Base
229229
{
230230
message: "webhook processed successfully",
231231
handler: "HelloHandler",
232-
timestamp: Time.now.iso8601
232+
timestamp: Time.now.utc.iso8601
233233
}
234234
end
235235
end
@@ -245,7 +245,7 @@ class GoodbyeHandler < Hooks::Plugins::Handlers::Base
245245
{
246246
message: "goodbye webhook processed successfully",
247247
handler: "GoodbyeHandler",
248-
timestamp: Time.now.iso8601
248+
timestamp: Time.now.utc.iso8601
249249
}
250250
end
251251
end

docs/design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class CustomErrorPlugin < Hooks::Plugins::Lifecycle
277277
{
278278
error: "Custom error message",
279279
code: determine_error_code(exception),
280-
timestamp: Time.now.iso8601
280+
timestamp: Time.now.utc.iso8601
281281
}
282282
end
283283
end

lib/hooks/app/endpoints/health.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class HealthEndpoint < Grape::API
1010
content_type "application/json"
1111
{
1212
status: "healthy",
13-
timestamp: Time.now.iso8601,
13+
timestamp: Time.now.utc.iso8601,
1414
version: Hooks::VERSION,
1515
uptime_seconds: (Time.now - Hooks::App::API.server_start_time).to_i
1616
}.to_json

lib/hooks/app/endpoints/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class VersionEndpoint < Grape::API
1010
content_type "application/json"
1111
{
1212
version: Hooks::VERSION,
13-
timestamp: Time.now.iso8601
13+
timestamp: Time.now.utc.iso8601
1414
}.to_json
1515
end
1616
end

lib/hooks/plugins/handlers/default.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def call(payload:, headers:, config:)
1515
{
1616
message: "webhook processed successfully",
1717
handler: "DefaultHandler",
18-
timestamp: Time.now.iso8601
18+
timestamp: Time.now.utc.iso8601
1919
}
2020
end
2121
end

spec/acceptance/plugins/handlers/hello.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def call(payload:, headers:, config:)
55
{
66
status: "success",
77
handler: self.class.name,
8-
timestamp: Time.now.iso8601
8+
timestamp: Time.now.utc.iso8601
99
}
1010
end
1111
end

spec/acceptance/plugins/handlers/team1_handler.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def call(payload:, headers:, config:)
4343
message: "Raw payload processed",
4444
payload_size: payload.length,
4545
environment: config.dig(:opts, :env),
46-
timestamp: Time.now.iso8601
46+
timestamp: Time.now.utc.iso8601
4747
}
4848
end
4949
end
@@ -62,7 +62,7 @@ def handle_deployment(payload, config)
6262
deployment_id: payload["deployment_id"],
6363
environment: payload["environment"] || config.dig(:opts, :env),
6464
teams_notified: config.dig(:opts, :teams),
65-
timestamp: Time.now.iso8601
65+
timestamp: Time.now.utc.iso8601
6666
}
6767
end
6868

@@ -83,7 +83,7 @@ def handle_alert(payload, config)
8383
alert_id: payload["alert_id"],
8484
level: alert_level,
8585
channels_notified: config.dig(:opts, :notify_channels),
86-
timestamp: Time.now.iso8601
86+
timestamp: Time.now.utc.iso8601
8787
}
8888
end
8989

@@ -98,7 +98,7 @@ def handle_generic(payload, config)
9898
handler: "Team1Handler",
9999
event_type: payload["event_type"],
100100
environment: config.dig(:opts, :env),
101-
timestamp: Time.now.iso8601
101+
timestamp: Time.now.utc.iso8601
102102
}
103103
end
104104
end

spec/acceptance/plugins/handlers/test_handler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def call(payload:, headers:, config:)
77
handler: "TestHandler",
88
payload_received: payload,
99
config_opts: config[:opts],
10-
timestamp: Time.now.iso8601
10+
timestamp: Time.now.utc.iso8601
1111
}
1212
end
1313
end

spec/integration/global_lifecycle_hooks_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def call(payload:, headers:, config:)
9292
{
9393
status: "success",
9494
handler: "IntegrationTestHandler",
95-
timestamp: Time.now.iso8601,
95+
timestamp: Time.now.utc.iso8601,
9696
payload_received: !payload.nil?
9797
}
9898
end

spec/integration/hooks_integration_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def call(payload:, headers:, config:)
4848
status: "test_success",
4949
payload_received: payload,
5050
config_opts: config[:opts],
51-
timestamp: Time.now.iso8601
51+
timestamp: Time.now.utc.iso8601
5252
}
5353
end
5454
end

0 commit comments

Comments
 (0)