Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(backend): Migrate extra to context #206

Merged
merged 4 commits into from
Aug 16, 2024
Merged
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
12 changes: 6 additions & 6 deletions src/Http/SlackClient.php
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@

if ($json['ok'] === false) {
withScope(function ($scope) use ($json, $channel, $text): void {
$scope->setExtras([
$scope->setContext('Slack API', [

Check warning on line 48 in src/Http/SlackClient.php

Codecov / codecov/patch

src/Http/SlackClient.php#L48

Added line #L48 was not covered by tests
'channel' => $channel,
'text' => $text,
'slack_response' => $json,
@@ -74,7 +74,7 @@

if ($json['ok'] === false) {
withScope(function ($scope) use ($json, $channel, $blocks): void {
$scope->setExtras([
$scope->setContext('Slack API', [

Check warning on line 77 in src/Http/SlackClient.php

Codecov / codecov/patch

src/Http/SlackClient.php#L77

Added line #L77 was not covered by tests
'channel' => $channel,
'blocks' => $blocks,
'slack_response' => $json,
@@ -107,7 +107,7 @@

if ($json['ok'] === false) {
withScope(function ($scope) use ($json, $channel, $user, $text, $threadTimestamp): void {
$scope->setExtras([
$scope->setContext('Slack API', [

Check warning on line 110 in src/Http/SlackClient.php

Codecov / codecov/patch

src/Http/SlackClient.php#L110

Added line #L110 was not covered by tests
'channel' => $channel,
'user' => $user,
'text' => $text,
@@ -138,7 +138,7 @@

if ($json['ok'] === false) {
withScope(function ($scope) use ($json, $user, $view): void {
$scope->setExtras([
$scope->setContext('Slack API', [

Check warning on line 141 in src/Http/SlackClient.php

Codecov / codecov/patch

src/Http/SlackClient.php#L141

Added line #L141 was not covered by tests
'user_id' => $user,
'view' => $view,
'slack_response' => $json,
@@ -167,7 +167,7 @@

if ($json['ok'] === false) {
withScope(function ($scope) use ($json, $triggerId, $view): void {
$scope->setExtras([
$scope->setContext('Slack API', [

Check warning on line 170 in src/Http/SlackClient.php

Codecov / codecov/patch

src/Http/SlackClient.php#L170

Added line #L170 was not covered by tests
'trigger_id' => $triggerId,
'view' => $view,
'slack_response' => $json,
@@ -196,7 +196,7 @@
return $json['user'];
} else {
withScope(function ($scope) use ($json, $user): void {
$scope->setExtras([
$scope->setContext('Slack API', [

Check warning on line 199 in src/Http/SlackClient.php

Codecov / codecov/patch

src/Http/SlackClient.php#L199

Added line #L199 was not covered by tests
'user' => $user,
'slack_response' => $json,
]);
4 changes: 2 additions & 2 deletions src/Service/PollService.php
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@

if ($json['ok'] === false) {
withScope(function ($scope) use ($json, $blocks, $responseUrl): void {
$scope->setExtras([
$scope->setContext('Slack API', [

Check warning on line 63 in src/Service/PollService.php

Codecov / codecov/patch

src/Service/PollService.php#L63

Added line #L63 was not covered by tests
'blocks' => $blocks,
'slack_response' => $json,
'response_url' => $responseUrl,
@@ -87,7 +87,7 @@

if ($json['ok'] === false) {
withScope(function ($scope) use ($json, $responseUrl): void {
$scope->setExtras([
$scope->setContext('Slack API', [

Check warning on line 90 in src/Service/PollService.php

Codecov / codecov/patch

src/Service/PollService.php#L90

Added line #L90 was not covered by tests
'slack_response' => $json,
'response_url' => $responseUrl,
]);