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

refactor: WebhookDeliverJobDataのcontentフィールドの型を具体的に #15310

Conversation

takejohn
Copy link
Contributor

@takejohn takejohn commented Jan 19, 2025

What

SystemWebhookDeliverJobData, UserWebhookDeliverJobDataの型を厳格にします。

  • SystemWebhookDeliverJobData
    • 型パラメータT extends SystemWebhookEventType = SystemWebhookEventTypeを追加します。
    • typeフィールドの型をTとします。
    • contentフィールドの型をSystemWebhookPayload<T>とします。
  • UserWebhookDeliverJobData
    • 型パラメータT extends WebhookEventTypes = WebhookEventTypesを追加します。
    • typeフィールドの型をTとします。
    • contentフィールドの型をUserWebhookPayload<T>とします。

Why

ソースコードを読んでいるとcontentにどんな値が入るかが分からなくて困った。

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Jan 19, 2025
Copy link
Contributor

github-actions bot commented Jan 19, 2025

このPRによるapi.jsonの差分
差分はありません。
Get diff files from Workflow Page

Copy link

codecov bot commented Jan 19, 2025

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 40.49%. Comparing base (fb2c105) to head (b32d6d3).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
packages/backend/src/queue/types.ts 0.00% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #15310      +/-   ##
===========================================
+ Coverage    40.46%   40.49%   +0.02%     
===========================================
  Files         1568     1568              
  Lines       199140   199143       +3     
  Branches      3952     3979      +27     
===========================================
+ Hits         80585    80639      +54     
+ Misses      117950   117899      -51     
  Partials       605      605              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@takejohn takejohn marked this pull request as draft January 19, 2025 10:45
@takejohn takejohn marked this pull request as ready for review January 19, 2025 10:54
@kakkokari-gtyih kakkokari-gtyih changed the title enhance: WebhookDeliverJobDataのcontentフィールドの型を具体的に refactor: WebhookDeliverJobDataのcontentフィールドの型を具体的に Jan 19, 2025
@mi-gh-maintainer mi-gh-maintainer bot merged commit dc48c49 into misskey-dev:develop Jan 19, 2025
32 checks passed
Copy link

Thank you 🙏

@takejohn takejohn deleted the enhance/webhook-deliver-job-data-content-type branch January 19, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR
Projects
Development

Successfully merging this pull request may close these issues.

1 participant