Skip to content

Commit a08874a

Browse files
committed
#7564 tickets as md files
1 parent 55084b3 commit a08874a

7 files changed

Lines changed: 157 additions & 0 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: "Add Frontmatter to Synchronized Release Notes"
3+
labels: enhancement, AI
4+
---
5+
6+
GH ticket id: #7580
7+
8+
**Epic:** #7564
9+
**Phase:** 2
10+
**Assignee:** tobiu
11+
**Status:** To Do
12+
13+
## Description
14+
15+
To improve the structure and utility of the locally synchronized release notes, we should add YAML frontmatter containing key metadata, similar to how issues are handled.
16+
17+
## Acceptance Criteria
18+
19+
1. The `#syncReleaseNotes` method in `SyncService.mjs` is updated to fetch `tagName`, `name`, and `publishedAt` in addition to the release `body`.
20+
2. The `gray-matter` library is used to stringify the release `body` with the fetched metadata as YAML frontmatter.
21+
3. The complete content (frontmatter + body) is saved to the local `.md` file.
22+
4. The filename convention is clarified and implemented to be clean and predictable (e.g., `v10.9.0.md` from a `v10.9.0` tag).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: "Add Comprehensive JSDoc to SyncService"
3+
labels: enhancement, AI, documentation
4+
---
5+
6+
GH ticket id: #7581
7+
8+
**Epic:** #7564
9+
**Phase:** 2
10+
**Assignee:** tobiu
11+
**Status:** To Do
12+
13+
## Description
14+
15+
To improve the long-term maintainability and clarity of the `SyncService`, all private methods should be documented with comprehensive JSDoc blocks.
16+
17+
## Acceptance Criteria
18+
19+
1. Comprehensive JSDoc blocks are added to all private methods in `SyncService.mjs` (e.g., `#ghCommand`, `#formatIssueMarkdown`, `#getIssuePath`, etc.).
20+
2. Each comment clearly describes the method's purpose, all of its parameters (`@param`), and its return value (`@returns`).
21+
3. Methods that can throw errors are documented with the `@throws` tag.
22+
4. At least one complex method, such as `#getIssuePath`, includes an `@example` block demonstrating its usage in different scenarios.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "Externalize Magic Numbers and Strings in SyncService"
3+
labels: enhancement, AI
4+
---
5+
6+
GH ticket id: #7582
7+
8+
**Epic:** #7564
9+
**Phase:** 3
10+
**Assignee:** tobiu
11+
**Status:** To Do
12+
13+
## Description
14+
15+
The `SyncService` implementation contains several hardcoded "magic numbers" and strings (e.g., API limits, buffer sizes, Markdown delimiters). To improve maintainability and make the service more configurable, these should be extracted and moved to the central `config.mjs` file.
16+
17+
## Acceptance Criteria
18+
19+
1. The following properties are added to the `githubWorkflow.issueSync` object in `config.mjs`:
20+
- `maxGhOutputBuffer` (e.g., `10 * 1024 * 1024`)
21+
- `maxIssues` (e.g., `10000`)
22+
- `maxReleases` (e.g., `1000`)
23+
- `commentSectionDelimiter` (e.g., `'## Comments'`)
24+
2. The `SyncService.mjs` file is refactored to import and use these new configuration values instead of the hardcoded numbers and strings.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: "Fix and Verify GitHub API Field Names in SyncService"
3+
labels: bug, AI
4+
---
5+
6+
GH ticket id: #7576
7+
8+
**Epic:** #7564
9+
**Phase:** 1
10+
**Assignee:** tobiu
11+
**Status:** To Do
12+
13+
## Description
14+
15+
A code review has highlighted a critical potential bug: a mismatch between the JSON fields requested from the `gh` CLI (which often use camelCase like `createdAt`) and the fields it actually returns (which may use snake_case like `created_at`). This ticket covers verifying the correct field names and standardizing their usage throughout the `SyncService` to prevent runtime errors.
16+
17+
## Acceptance Criteria
18+
19+
1. The actual JSON output of `gh issue view <N> --json createdAt,created_at,author,user` and `gh release view <T> --json publishedAt,published_at` is inspected to definitively identify the correct field names returned by the API.
20+
2. All `gh` CLI calls in `SyncService.mjs` are updated to request the correct, verified field names.
21+
3. All property accessors within the service's logic (e.g., `issue.createdAt` vs. `issue.created_at`) are updated to match the verified API response, ensuring consistency.
22+
4. A new unit or integration test is created to validate the field name mappings for a sample issue and release payload, preventing future regressions.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "Harden Release Caching and Add Fallback"
3+
labels: enhancement, AI
4+
---
5+
6+
GH ticket id: #7578
7+
8+
**Epic:** #7564
9+
**Phase:** 1
10+
**Assignee:** tobiu
11+
**Status:** To Do
12+
13+
## Description
14+
15+
The `#fetchAndCacheReleases` method needs to be hardened to handle the edge case where no releases are found after the `syncStartDate`. Additionally, the fallback version for archiving should be made configurable.
16+
17+
## Acceptance Criteria
18+
19+
1. A new property, `defaultArchiveVersion`, is added to the `githubWorkflow.issueSync` object in `config.mjs` with a value like `'unversioned'`.
20+
2. The `#fetchAndCacheReleases` method in `SyncService.mjs` is updated to log a warning if `this.releases` is empty after filtering.
21+
3. The `#getIssuePath` method is updated to use the new `defaultArchiveVersion` from the config as its fallback value instead of the hardcoded `'unknown'`.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: "Track and Handle Failed Pushes in SyncService"
3+
labels: enhancement, AI
4+
---
5+
6+
GH ticket id: #7579
7+
8+
**Epic:** #7564
9+
**Phase:** 2
10+
**Assignee:** tobiu
11+
**Status:** To Do
12+
13+
## Description
14+
15+
Currently, if a local issue file is modified but the corresponding issue is deleted on GitHub, the push operation will fail silently on every sync. We need to track these failures to prevent repeated API calls and to aid in debugging.
16+
17+
## Acceptance Criteria
18+
19+
1. The `catch` block in the `#pushToGitHub` loop is updated to log the specific error message from the `gh` command.
20+
2. A `push_failures` array is added to the metadata object that is managed throughout the sync process.
21+
3. When a push for an issue fails, its number is added to the `push_failures` array.
22+
4. The `#pushToGitHub` logic is updated to check if an issue number is present in the `metadata.push_failures` from the previous sync. If it is, the service should skip attempting to push it again and log a debug message.
23+
5. After a full sync cycle, if an issue that was previously in `push_failures` is successfully pulled (i.e., it exists on GitHub again), it should be removed from the `push_failures` list in the new metadata.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: "Verify Minimum gh CLI Version Before Sync"
3+
labels: enhancement, AI
4+
---
5+
6+
GH ticket id: #7577
7+
8+
**Epic:** #7564
9+
**Phase:** 1
10+
**Assignee:** tobiu
11+
**Status:** To Do
12+
13+
## Description
14+
15+
The `SyncService` depends on specific features and output formats of the GitHub CLI (`gh`). To prevent unexpected errors, we must verify that the installed version of `gh` meets the minimum requirement defined in the configuration before attempting any synchronization operations.
16+
17+
## Acceptance Criteria
18+
19+
1. A new private method, `#verifyGhVersion()`, is added to `SyncService.mjs`.
20+
2. This method executes `gh --version`, parses the output to get the semantic version number.
21+
3. It compares the installed version against the `aiConfig.githubWorkflow.minGhVersion` from the configuration.
22+
4. If the installed version is lower than the minimum requirement, the method must throw a clear, informative error that includes the current version, the required version, and instructions to upgrade.
23+
5. The `runFullSync()` method is updated to call `#verifyGhVersion()` at the very beginning of the process, ensuring the check runs before any other logic.

0 commit comments

Comments
 (0)