mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
refactor: enhance feature filtering in FeatureLoader
- Updated getPending method to ensure that only features with a defined status are included in the pending features list. - Improved code readability by using a more concise filter function. This change enhances the robustness of feature status handling.
This commit is contained in:
@@ -477,8 +477,8 @@ export class FeatureLoader {
|
|||||||
async getPending(projectPath: string): Promise<Feature[]> {
|
async getPending(projectPath: string): Promise<Feature[]> {
|
||||||
try {
|
try {
|
||||||
const allFeatures = await this.getAll(projectPath);
|
const allFeatures = await this.getAll(projectPath);
|
||||||
const pendingFeatures = allFeatures.filter((f) =>
|
const pendingFeatures = allFeatures.filter(
|
||||||
['pending', 'ready', 'backlog'].includes(f.status)
|
(f) => f.status && ['pending', 'ready', 'backlog'].includes(f.status)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Resolve dependencies and order features
|
// Resolve dependencies and order features
|
||||||
|
|||||||
Reference in New Issue
Block a user