Skip to content

Commit

Permalink
refactor to seperate Phabricator related metadata away from DiffComment
Browse files Browse the repository at this point in the history
Summary:
**Context:**

Because ISL2.0 is an open source project. The infrastructure is shared with being able to be used for GitHub in mind. Such as DiffComment type.

It is good for us to prevent Phabricator specific data leaking into generic typings. Thus in this Diff I'm trying to split the data parsing needed from the Phabricator extension side to be handled separately. This will also make it easier for us to add in other datatypes needed in the future.

This is my try at doing this. It is a bit difficult and I try to do everything with one query call. So I split the query function and the parsing function up and I can individually call the query in the Phabricator extension side and have the flexibility of manipulating the other data. However, a cleaner way might be just have Phabricator extension to make another query for the data that it needs. Thoughts on this? cc. evangrayk

More context.
https://www.internalfb.com/diff/D68190279?dst_version_fbid=1546045746099332&transaction_fbid=1178252550317946

Reviewed By: quark-zju

Differential Revision: D69585838

fbshipit-source-id: 666c34ef6e71de50b6ae624bb9cad2f26776218f
  • Loading branch information
Jack Huang authored and facebook-github-bot committed Feb 13, 2025
1 parent 17fc778 commit 41fc699
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions addons/isl/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@ export enum ArchivedReasonType {
STALE_FILE_CHANGED = 'STALE_FILE_CHANGED',
}

export type PhabricatorVersion = {
versionAbbr?: string;
isLatestVersion?: boolean;
};

export type CodeChange = {
oldContent?: string;
newContent?: string;
Expand Down Expand Up @@ -151,7 +146,6 @@ export type DiffComment = {
html: string;
content?: string;
created: Date;
versionInfo?: PhabricatorVersion;
commitHash?: string;
/** If it's an inline comment, this is the file path with the comment */
filename?: string;
Expand Down

0 comments on commit 41fc699

Please sign in to comment.