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

github - add new workflows with the folders upsert #9562

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion connectors/migrations/20241219_backfill_github_folders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async function upsertFoldersForConnector(
}
}
makeScript({}, async ({ execute }, logger) => {
const connectors = await ConnectorResource.listByType("zendesk", {});
const connectors = await ConnectorResource.listByType("github", {});

for (const connector of connectors) {
logger.info(`Upserting folders for connector ${connector.id}`);
Expand Down
10 changes: 5 additions & 5 deletions connectors/src/connectors/github/temporal/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import {
githubCodeSyncWorkflow,
githubDiscussionGarbageCollectWorkflow,
githubDiscussionSyncWorkflow,
githubFullSyncWorkflow,
githubFullSyncWorkflowV2,
githubIssueGarbageCollectWorkflow,
githubIssueSyncWorkflow,
githubRepoGarbageCollectWorkflow,
githubReposSyncWorkflow,
githubReposSyncWorkflowV2,
} from "@connectors/connectors/github/temporal/workflows";
import { dataSourceConfigFromConnector } from "@connectors/lib/api/data_source_config";
import { getTemporalClient } from "@connectors/lib/temporal";
Expand Down Expand Up @@ -68,7 +68,7 @@ export async function launchGithubFullSyncWorkflow({
return;
}

await client.workflow.start(githubFullSyncWorkflow, {
await client.workflow.start(githubFullSyncWorkflowV2, {
args: [dataSourceConfig, connectorId, syncCodeOnly, forceCodeResync],
taskQueue: QUEUE_NAME,
workflowId: getFullSyncWorkflowId(connectorId),
Expand All @@ -87,7 +87,7 @@ export async function getGithubFullSyncWorkflow(connectorId: ModelId): Promise<{
} | null> {
const client = await getTemporalClient();

const handle: WorkflowHandle<typeof githubFullSyncWorkflow> =
const handle: WorkflowHandle<typeof githubFullSyncWorkflowV2> =
client.workflow.getHandle(getFullSyncWorkflowId(connectorId));

try {
Expand Down Expand Up @@ -116,7 +116,7 @@ export async function launchGithubReposSyncWorkflow(
}
const dataSourceConfig = dataSourceConfigFromConnector(connector);

await client.workflow.start(githubReposSyncWorkflow, {
await client.workflow.start(githubReposSyncWorkflowV2, {
args: [dataSourceConfig, connectorId, orgLogin, repos],
taskQueue: QUEUE_NAME,
workflowId: getReposSyncWorkflowId(connectorId),
Expand Down
Loading
Loading