ai-sdlc 0.3.1-alpha.2 → 0.3.1-alpha.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/verification.d.ts +23 -3
- package/dist/agents/verification.d.ts.map +1 -1
- package/dist/agents/verification.js +93 -11
- package/dist/agents/verification.js.map +1 -1
- package/dist/cli/commands.d.ts +8 -1
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +67 -2
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/formatting.d.ts +15 -0
- package/dist/cli/formatting.d.ts.map +1 -1
- package/dist/cli/formatting.js +34 -0
- package/dist/cli/formatting.js.map +1 -1
- package/dist/cli/runner.d.ts.map +1 -1
- package/dist/cli/runner.js +6 -4
- package/dist/cli/runner.js.map +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +92 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/stack-detector.d.ts +28 -0
- package/dist/core/stack-detector.d.ts.map +1 -0
- package/dist/core/stack-detector.js +395 -0
- package/dist/core/stack-detector.js.map +1 -0
- package/dist/core/story-logger.d.ts +51 -1
- package/dist/core/story-logger.d.ts.map +1 -1
- package/dist/core/story-logger.js +69 -3
- package/dist/core/story-logger.js.map +1 -1
- package/dist/core/story.d.ts.map +1 -1
- package/dist/core/story.js +8 -4
- package/dist/core/story.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/services/gh-cli.d.ts +81 -0
- package/dist/services/gh-cli.d.ts.map +1 -1
- package/dist/services/gh-cli.js +257 -0
- package/dist/services/gh-cli.js.map +1 -1
- package/dist/services/ticket-provider/github-provider.d.ts +27 -12
- package/dist/services/ticket-provider/github-provider.d.ts.map +1 -1
- package/dist/services/ticket-provider/github-provider.js +51 -17
- package/dist/services/ticket-provider/github-provider.js.map +1 -1
- package/dist/types/index.d.ts +36 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/services/github-projects/client.d.ts +0 -25
- package/dist/services/github-projects/client.d.ts.map +0 -1
- package/dist/services/github-projects/client.js +0 -99
- package/dist/services/github-projects/client.js.map +0 -1
- package/dist/services/github-projects/index.d.ts +0 -8
- package/dist/services/github-projects/index.d.ts.map +0 -1
- package/dist/services/github-projects/index.js +0 -8
- package/dist/services/github-projects/index.js.map +0 -1
- package/dist/services/github-projects/priority-normalizer.d.ts +0 -21
- package/dist/services/github-projects/priority-normalizer.d.ts.map +0 -1
- package/dist/services/github-projects/priority-normalizer.js +0 -36
- package/dist/services/github-projects/priority-normalizer.js.map +0 -1
- package/dist/services/github-projects/queries.d.ts +0 -17
- package/dist/services/github-projects/queries.d.ts.map +0 -1
- package/dist/services/github-projects/queries.js +0 -79
- package/dist/services/github-projects/queries.js.map +0 -1
- package/dist/services/github-projects/types.d.ts +0 -46
- package/dist/services/github-projects/types.d.ts.map +0 -1
- package/dist/services/github-projects/types.js +0 -5
- package/dist/services/github-projects/types.js.map +0 -1
- package/dist/services/priority-sync.d.ts +0 -25
- package/dist/services/priority-sync.d.ts.map +0 -1
- package/dist/services/priority-sync.js +0 -67
- package/dist/services/priority-sync.js.map +0 -1
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utilities for normalizing priority values from GitHub Projects.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Normalize position-based priority.
|
|
6
|
-
* Converts project position (1, 2, 3, ...) to priority value (10, 20, 30, ...).
|
|
7
|
-
*
|
|
8
|
-
* @param position - Position in the project (1-indexed)
|
|
9
|
-
* @returns Normalized priority value (position * 10)
|
|
10
|
-
*/
|
|
11
|
-
export function normalizePositionPriority(position) {
|
|
12
|
-
if (position <= 0) {
|
|
13
|
-
throw new Error(`Invalid position: ${position} (must be positive)`);
|
|
14
|
-
}
|
|
15
|
-
return position * 10;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Normalize priority using a field value mapping.
|
|
19
|
-
* Maps priority field values (e.g., 'P0', 'P1', 'High') to numeric priorities.
|
|
20
|
-
*
|
|
21
|
-
* @param value - Priority field value from GitHub Projects
|
|
22
|
-
* @param mapping - Mapping from field values to numeric priorities
|
|
23
|
-
* @returns Normalized priority value, or null if value not in mapping
|
|
24
|
-
*/
|
|
25
|
-
export function normalizeMappedPriority(value, mapping) {
|
|
26
|
-
const priority = mapping[value];
|
|
27
|
-
if (priority === undefined) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
// Validate that the mapped value is a valid number
|
|
31
|
-
if (typeof priority !== 'number' || !Number.isFinite(priority) || priority <= 0) {
|
|
32
|
-
throw new Error(`Invalid priority mapping for "${value}": ${priority} (must be positive finite number)`);
|
|
33
|
-
}
|
|
34
|
-
return priority;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=priority-normalizer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"priority-normalizer.js","sourceRoot":"","sources":["../../../src/services/github-projects/priority-normalizer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAAgB;IACxD,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,qBAAqB,QAAQ,qBAAqB,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,QAAQ,GAAG,EAAE,CAAC;AACvB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAa,EACb,OAA+B;IAE/B,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,mDAAmD;IACnD,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;QAChF,MAAM,IAAI,KAAK,CAAC,iCAAiC,KAAK,MAAM,QAAQ,mCAAmC,CAAC,CAAC;IAC3G,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GraphQL queries for GitHub Projects v2 API.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Query to fetch all items from a GitHub Project with priority field.
|
|
6
|
-
* This query is designed to work with both organization and user projects.
|
|
7
|
-
*
|
|
8
|
-
* @param owner - The owner login (organization or user)
|
|
9
|
-
* @param number - The project number
|
|
10
|
-
* @param priorityField - Optional name of the priority field to fetch
|
|
11
|
-
*/
|
|
12
|
-
export declare function buildProjectItemsQuery(owner: string, number: number, priorityField?: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Extract priority value from a GraphQL field value node.
|
|
15
|
-
*/
|
|
16
|
-
export declare function extractPriorityValue(fieldValue: any): string | undefined;
|
|
17
|
-
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/services/github-projects/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CA+CpG;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAmBxE"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GraphQL queries for GitHub Projects v2 API.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Query to fetch all items from a GitHub Project with priority field.
|
|
6
|
-
* This query is designed to work with both organization and user projects.
|
|
7
|
-
*
|
|
8
|
-
* @param owner - The owner login (organization or user)
|
|
9
|
-
* @param number - The project number
|
|
10
|
-
* @param priorityField - Optional name of the priority field to fetch
|
|
11
|
-
*/
|
|
12
|
-
export function buildProjectItemsQuery(owner, number, priorityField) {
|
|
13
|
-
const priorityFieldFragment = priorityField
|
|
14
|
-
? `
|
|
15
|
-
priorityValue: fieldValueByName(name: "${priorityField}") {
|
|
16
|
-
... on ProjectV2ItemFieldSingleSelectValue {
|
|
17
|
-
name
|
|
18
|
-
}
|
|
19
|
-
... on ProjectV2ItemFieldTextValue {
|
|
20
|
-
text
|
|
21
|
-
}
|
|
22
|
-
... on ProjectV2ItemFieldNumberValue {
|
|
23
|
-
number
|
|
24
|
-
}
|
|
25
|
-
}`
|
|
26
|
-
: '';
|
|
27
|
-
// Try both organization and user paths
|
|
28
|
-
return `
|
|
29
|
-
query {
|
|
30
|
-
org: organization(login: "${owner}") {
|
|
31
|
-
projectV2(number: ${number}) {
|
|
32
|
-
items(first: 100) {
|
|
33
|
-
nodes {
|
|
34
|
-
content {
|
|
35
|
-
... on Issue {
|
|
36
|
-
number
|
|
37
|
-
}
|
|
38
|
-
}${priorityFieldFragment}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
user(login: "${owner}") {
|
|
44
|
-
projectV2(number: ${number}) {
|
|
45
|
-
items(first: 100) {
|
|
46
|
-
nodes {
|
|
47
|
-
content {
|
|
48
|
-
... on Issue {
|
|
49
|
-
number
|
|
50
|
-
}
|
|
51
|
-
}${priorityFieldFragment}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Extract priority value from a GraphQL field value node.
|
|
61
|
-
*/
|
|
62
|
-
export function extractPriorityValue(fieldValue) {
|
|
63
|
-
if (!fieldValue)
|
|
64
|
-
return undefined;
|
|
65
|
-
// Single select field
|
|
66
|
-
if (fieldValue.name !== undefined) {
|
|
67
|
-
return fieldValue.name;
|
|
68
|
-
}
|
|
69
|
-
// Text field
|
|
70
|
-
if (fieldValue.text !== undefined) {
|
|
71
|
-
return fieldValue.text;
|
|
72
|
-
}
|
|
73
|
-
// Number field
|
|
74
|
-
if (fieldValue.number !== undefined) {
|
|
75
|
-
return String(fieldValue.number);
|
|
76
|
-
}
|
|
77
|
-
return undefined;
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=queries.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/services/github-projects/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAa,EAAE,MAAc,EAAE,aAAsB;IAC1F,MAAM,qBAAqB,GAAG,aAAa;QACzC,CAAC,CAAC;qDAC+C,aAAa;;;;;;;;;;cAUpD;QACV,CAAC,CAAC,EAAE,CAAC;IAEP,uCAAuC;IACvC,OAAO;;kCAEyB,KAAK;4BACX,MAAM;;;;;;;iBAOjB,qBAAqB;;;;;qBAKjB,KAAK;4BACE,MAAM;;;;;;;iBAOjB,qBAAqB;;;;;;GAMnC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAe;IAClD,IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAElC,sBAAsB;IACtB,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAClC,OAAO,UAAU,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,aAAa;IACb,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAClC,OAAO,UAAU,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,eAAe;IACf,IAAI,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACpC,OAAO,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Types for GitHub Projects v2 integration.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Represents an item in a GitHub Project.
|
|
6
|
-
*/
|
|
7
|
-
export interface ProjectItem {
|
|
8
|
-
/** Issue number */
|
|
9
|
-
issueNumber: number;
|
|
10
|
-
/** Priority field value (e.g., 'P0', 'P1', 'High', 'Medium') */
|
|
11
|
-
priorityValue?: string;
|
|
12
|
-
/** Position in the project view (1-indexed) */
|
|
13
|
-
position?: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Priority data extracted from a GitHub Project.
|
|
17
|
-
*/
|
|
18
|
-
export interface ProjectPriorityData {
|
|
19
|
-
/** Normalized priority value (10, 20, 30, etc.) */
|
|
20
|
-
priority: number;
|
|
21
|
-
/** Source of the priority value */
|
|
22
|
-
source: PrioritySource;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Source of the priority value.
|
|
26
|
-
* - 'project-position': Priority derived from issue position in project board
|
|
27
|
-
* - 'project-field': Priority derived from explicit priority field value
|
|
28
|
-
* - 'local': Priority set locally, not synced from project
|
|
29
|
-
*/
|
|
30
|
-
export type PrioritySource = 'project-position' | 'project-field' | 'local';
|
|
31
|
-
/**
|
|
32
|
-
* Configuration for GitHub Projects priority sync.
|
|
33
|
-
*/
|
|
34
|
-
export interface GitHubProjectsConfig {
|
|
35
|
-
/** Owner of the repository (org or user) */
|
|
36
|
-
owner: string;
|
|
37
|
-
/** Repository name */
|
|
38
|
-
repo: string;
|
|
39
|
-
/** GitHub Projects v2 project number */
|
|
40
|
-
projectNumber: number;
|
|
41
|
-
/** Name of the priority field in the project (if using explicit field) */
|
|
42
|
-
priorityField?: string;
|
|
43
|
-
/** Mapping from priority field values to numeric priorities */
|
|
44
|
-
priorityMapping?: Record<string, number>;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/github-projects/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,MAAM,EAAE,cAAc,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,eAAe,GAAG,OAAO,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/github-projects/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Service for syncing story priority from external ticketing systems.
|
|
3
|
-
*/
|
|
4
|
-
import { Story } from '../types/index.js';
|
|
5
|
-
import { TicketProvider } from './ticket-provider/types.js';
|
|
6
|
-
/**
|
|
7
|
-
* Sync priority for a single story from its ticket provider.
|
|
8
|
-
* Updates the story's priority and priority_source fields if a priority is returned.
|
|
9
|
-
*
|
|
10
|
-
* @param story - Story to sync priority for
|
|
11
|
-
* @param provider - Ticket provider to use for syncing
|
|
12
|
-
* @returns Updated story if priority was synced, null if no sync needed
|
|
13
|
-
*/
|
|
14
|
-
export declare function syncStoryPriority(story: Story, provider: TicketProvider): Promise<Story | null>;
|
|
15
|
-
/**
|
|
16
|
-
* Sync priority for multiple stories.
|
|
17
|
-
* Continues on individual failures to ensure all stories are attempted.
|
|
18
|
-
*
|
|
19
|
-
* @param stories - Stories to sync priority for
|
|
20
|
-
* @param provider - Ticket provider to use for syncing
|
|
21
|
-
* @param onProgress - Optional callback for progress updates
|
|
22
|
-
* @returns Number of successfully synced stories
|
|
23
|
-
*/
|
|
24
|
-
export declare function syncAllStoriesPriority(stories: Story[], provider: TicketProvider, onProgress?: (current: number, total: number, story: Story) => void): Promise<number>;
|
|
25
|
-
//# sourceMappingURL=priority-sync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"priority-sync.d.ts","sourceRoot":"","sources":["../../src/services/priority-sync.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAoCvB;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,KAAK,EAAE,EAChB,QAAQ,EAAE,cAAc,EACxB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,GAClE,OAAO,CAAC,MAAM,CAAC,CAiBjB"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Service for syncing story priority from external ticketing systems.
|
|
3
|
-
*/
|
|
4
|
-
import { updateStoryField } from '../core/story.js';
|
|
5
|
-
/**
|
|
6
|
-
* Sync priority for a single story from its ticket provider.
|
|
7
|
-
* Updates the story's priority and priority_source fields if a priority is returned.
|
|
8
|
-
*
|
|
9
|
-
* @param story - Story to sync priority for
|
|
10
|
-
* @param provider - Ticket provider to use for syncing
|
|
11
|
-
* @returns Updated story if priority was synced, null if no sync needed
|
|
12
|
-
*/
|
|
13
|
-
export async function syncStoryPriority(story, provider) {
|
|
14
|
-
// Only sync if story has a ticket ID and provider supports priority sync
|
|
15
|
-
if (!story.frontmatter.ticket_id || !provider.syncPriority) {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
try {
|
|
19
|
-
const priority = await provider.syncPriority(story.frontmatter.ticket_id);
|
|
20
|
-
// If priority is null, the ticket is not in a project - keep local priority
|
|
21
|
-
if (priority === null) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
// Update priority if it changed
|
|
25
|
-
if (story.frontmatter.priority !== priority) {
|
|
26
|
-
await updateStoryField(story, 'priority', priority);
|
|
27
|
-
await updateStoryField(story, 'priority_source', 'github-project');
|
|
28
|
-
await updateStoryField(story, 'ticket_synced_at', new Date().toISOString());
|
|
29
|
-
return story;
|
|
30
|
-
}
|
|
31
|
-
// Priority unchanged, but update sync timestamp
|
|
32
|
-
if (story.frontmatter.priority_source !== 'github-project') {
|
|
33
|
-
await updateStoryField(story, 'priority_source', 'github-project');
|
|
34
|
-
}
|
|
35
|
-
await updateStoryField(story, 'ticket_synced_at', new Date().toISOString());
|
|
36
|
-
return story;
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
// Log error but don't throw - gracefully continue with local priority
|
|
40
|
-
console.warn(`Failed to sync priority for story ${story.slug}: ${error instanceof Error ? error.message : String(error)}`);
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Sync priority for multiple stories.
|
|
46
|
-
* Continues on individual failures to ensure all stories are attempted.
|
|
47
|
-
*
|
|
48
|
-
* @param stories - Stories to sync priority for
|
|
49
|
-
* @param provider - Ticket provider to use for syncing
|
|
50
|
-
* @param onProgress - Optional callback for progress updates
|
|
51
|
-
* @returns Number of successfully synced stories
|
|
52
|
-
*/
|
|
53
|
-
export async function syncAllStoriesPriority(stories, provider, onProgress) {
|
|
54
|
-
let syncedCount = 0;
|
|
55
|
-
for (let i = 0; i < stories.length; i++) {
|
|
56
|
-
const story = stories[i];
|
|
57
|
-
if (onProgress) {
|
|
58
|
-
onProgress(i + 1, stories.length, story);
|
|
59
|
-
}
|
|
60
|
-
const updated = await syncStoryPriority(story, provider);
|
|
61
|
-
if (updated) {
|
|
62
|
-
syncedCount++;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return syncedCount;
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=priority-sync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"priority-sync.js","sourceRoot":"","sources":["../../src/services/priority-sync.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAAY,EACZ,QAAwB;IAExB,yEAAyE;IACzE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;QAC3D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAE1E,4EAA4E;QAC5E,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YACtB,OAAO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