Skip to content

Commit

Permalink
Phabricator fixes (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjwooo authored Jun 18, 2022
1 parent 11f78b0 commit 1c503d5
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class PhabricatorCommon {
const parts = message.split('\n\n');
const revision = parts.find((p) => p.startsWith('Differential Revision:'));
const revisionIdStr = revision
? revision.split('/D').reverse()[0].trim()
? revision.split('/D').reverse()[0].trim().split(/\s+/)[0]
: undefined;
const revisionId = Utils.parseIntegerWithDefault(revisionIdStr, -1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('phabricator', () => {
logger.debug(stdout);

const processedByStream = {
commits: 6,
commits: 7,
projects: 4,
repositories: 2,
revisions: 3,
Expand All @@ -62,13 +62,13 @@ describe('phabricator', () => {
tms_TaskBoard: 4,
tms_TaskBoardProjectRelationship: 4,
vcs_Branch: 2,
vcs_BranchCommitAssociation: 6,
vcs_Commit: 6,
vcs_BranchCommitAssociation: 7,
vcs_Commit: 7,
vcs_Membership: 4,
vcs_Organization: 2,
vcs_PullRequest: 3,
vcs_PullRequestReview: 3,
vcs_PullRequest__Update: 2,
vcs_PullRequest__Update: 3,
vcs_Repository: 2,
vcs_User: 4,
};
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sources/phabricator-source/src/streams/commits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Commits extends AirbyteStreamBase {
return require('../../resources/schemas/commits.json');
}
get primaryKey(): StreamKey {
throw ['fields', 'identifier'];
return ['fields', 'identifier'];
}
get cursorField(): string[] {
return ['fields', 'committer', 'epoch'];
Expand Down
2 changes: 1 addition & 1 deletion sources/phabricator-source/src/streams/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Projects extends AirbyteStreamBase {
return require('../../resources/schemas/projects.json');
}
get primaryKey(): StreamKey {
throw 'phid';
return 'phid';
}
get cursorField(): string[] {
return ['fields', 'dateModified'];
Expand Down
2 changes: 1 addition & 1 deletion sources/phabricator-source/src/streams/repositories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Repositories extends AirbyteStreamBase {
return require('../../resources/schemas/repositories.json');
}
get primaryKey(): StreamKey {
throw 'phid';
return 'phid';
}
get cursorField(): string[] {
return ['fields', 'dateModified'];
Expand Down
2 changes: 1 addition & 1 deletion sources/phabricator-source/src/streams/revisions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Revisions extends AirbyteStreamBase {
return require('../../resources/schemas/revisions.json');
}
get primaryKey(): StreamKey {
throw 'phid';
return 'phid';
}
get cursorField(): string[] {
return ['fields', 'dateModified'];
Expand Down
2 changes: 1 addition & 1 deletion sources/phabricator-source/src/streams/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Users extends AirbyteStreamBase {
return require('../../resources/schemas/users.json');
}
get primaryKey(): StreamKey {
throw 'phid';
return 'phid';
}
get cursorField(): string[] {
return ['fields', 'dateModified'];
Expand Down

0 comments on commit 1c503d5

Please sign in to comment.