-
Couldn't load subscription status.
- Fork 3
🏷️ Manually update types for pr:comment:edited
#7
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
Conversation
📝 WalkthroughWalkthroughThe changes involve significant updates to TypeScript interfaces related to pull request comments and associated entities. Key modifications include the addition of new properties and interfaces, such as Changes
Possibly related PRs
Suggested labels
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- src/server/webhooks/events/pr/comment_edited.ts (5 hunks)
🔇 Additional comments (11)
src/server/webhooks/events/pr/comment_edited.ts (11)
14-18: Update 'Actor' interface with 'links' and 'type' propertiesAdding the
linksproperty of typeActorLinksand updatingtypetoSchemaApplicationUser["type"]in theActorinterface improves type accuracy and aligns it with the schema definitions.
20-21: Definition of 'ActorLinks' interfaceThe
ActorLinksinterface is correctly defined with aselfproperty containing an array ofSelfobjects, appropriately representing actor links.
26-27: Enhancement of 'Author' interface with 'role' and 'status' propertiesIncluding
roleandstatusproperties, derived fromSchemaPullRequestParticipant, enhances theAuthorinterface by providing more detailed participant information.
31-34: Definition of 'Clone' interfaceThe
Cloneinterface is properly defined withhrefandnameproperties, representing clone URLs effectively.
71-74: Update 'Project' interface with 'links' and 'type' propertiesAdding
linksof typeActorLinksand updatingtypetoSchemaProject["type"]in theProjectinterface enhances consistency with schema definitions.
106-106: Addition of 'type' property to 'Ref' interfaceThe inclusion of
type, derived fromSchemaRestMinimalRef["type"], in theRefinterface improves type specificity.
110-120: Update 'Repository' interface with new propertiesAdding properties such as
archived,hierarchyId,links(of typeRepositoryLinks), and updatingstatetoSchemaRepository["state"]enhances theRepositoryinterface. Ensure that these additions reflect actual webhook data and that the application handles these properties appropriately.To validate these properties, consider examining sample webhook payloads or writing tests.
124-127: Definition of 'RepositoryLinks' interfaceThe
RepositoryLinksinterface is accurately defined withcloneandselfproperties, containing arrays ofCloneandSelfobjects, respectively.
129-131: Definition of 'Self' interfaceThe
Selfinterface is properly defined with anhrefproperty, effectively representing a link reference.
85-89: Enhancement of 'PullRequest' interface with 'description' and 'links'Including
descriptionandlinksproperties in thePullRequestinterface provides more comprehensive information about pull requests. Verify that these properties are correctly handled in the application logic.You can use the following script to check for these properties in webhook payloads:
#!/bin/bash # Verify 'PullRequest' interface properties in webhook payloads # Search for 'pullRequest' objects and check for 'description' and 'links' rg --type json '"pullRequest".*' -A 20 | rg '"description"| "links"'
42-47: Addition of new properties to 'Comment' interfaceIntroducing properties such as
severity,state,threadResolved,threadResolvedDate, andthreadResolverenriches theCommentinterface. Ensure that these properties are accurately populated from the webhook payloads and that any consumers of this interface handle them correctly.To confirm these properties are present in the webhook data, you can run:
Atlassian's docs is terrible. I had to update these types manually from a dummy webhook.
Summary by CodeRabbit
New Features
Bug Fixes