Skip to content

Commit

Permalink
Update parents during sync
Browse files Browse the repository at this point in the history
  • Loading branch information
philipperolet committed Sep 6, 2023
1 parent 9ae414a commit 4b73bb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connectors/src/connectors/github/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export async function githubUpsertIssueActivity(
documentUrl: issue.url,
timestampMs: lastUpdateTimestamp,
tags: tags,
parents: [],
parents: [issueNumber.toString(), repoId.toString()],
retries: 3,
delayBetweenRetriesMs: 500,
loggerArgs: { ...loggerArgs, provider: "github" },
Expand Down Expand Up @@ -281,7 +281,7 @@ export async function githubUpsertDiscussionActivity(
documentUrl: discussion.url,
timestampMs: new Date(discussion.createdAt).getTime(),
tags,
parents: [],
parents: [discussionNumber.toString(), repoId.toString()],
retries: 3,
delayBetweenRetriesMs: 500,
loggerArgs: { ...loggerArgs, provider: "github" },
Expand Down
3 changes: 3 additions & 0 deletions core/src/data_sources/data_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ pub struct Chunk {
/// parent in the array, their channel (since a channel does not have any
/// parent).
///
/// For github, we store the github issue / discussion's number (as string), and
/// the repo name (its "parent" in the hierarchy).
///
/// Parents are at the time of writing only relevant for managed datasources
/// since standard datasources do not allow specifying a hierarchy. A parent is
/// represented by a string of characters which correspond to the parent's
Expand Down

0 comments on commit 4b73bb8

Please sign in to comment.