Skip to content

Commit 095a48f

Browse files
authored
add the priority labels
1 parent 7e636dd commit 095a48f

23 files changed

+498
-214
lines changed

TODO.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11

2-
- Add support for issues from external repos
3-
- Add the developer stats and badges/achievements
2+
3+
- show original planned percent for complete
44
- Pass the config JSON file refrence thru the yml file
5+
- Cache repo issues
56
- docs!
7+
- Add the developer stats and badges/achievements
68
- Add the PR parsing logic on teh card/issue and render it for the "In review" items
79

8-
- project pulse - graph on how many items fixed on particular day ?
10+
- project pulse - graph on how many items fixed on particular week ?
11+
- burn-down chart - graph on how many items fixed on particular day ?
912
- stats on when moved from one column to another ?
1013

1114
- Badges:

schemas/IConfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,14 @@
8989
"type": "integer"
9090
},
9191
"trackLabels": {
92-
"description": "Issue labels that will be rendered as sections\non the aggregated issue.",
92+
"description": "Issue labels that will be rendered as sections\non the aggregated issue. With descending priority.\n\nExample: [\"port-forwarding\", \"workbench\", \"performance\", \"serverless\"]\n\nThe issues with both \"port-forwarding\" and \"performance\" labels, will\nshow up only in the` Port-forwarding` section since it has the higher\nprecedence over the \"performance\" label.",
93+
"type": "array",
94+
"items": {
95+
"type": "string"
96+
}
97+
},
98+
"priorityLabels": {
99+
"description": "List of mutually exclusive[1] priority labels with descending priority[2].\nExample: [\"p0\", \"p1\", \"p2\", \"p3\"]\n- [1]: No `p0` and `p1` can be assigned at the same time.\n- [2]: Label in [N-th] array position has higher precendence then\n any item in the rest of the list. `p1` has higher priority\n than `p3` in the example above.\n\nThese labels will be rendered as a label on the list items\nto signify the priority of the item.",
93100
"type": "array",
94101
"items": {
95102
"type": "string"

src/interfaces/IProject.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,29 @@ export interface IProject {
88

99
/**
1010
* Issue labels that will be rendered as sections
11-
* on the aggregated issue.
11+
* on the aggregated issue. With descending priority.
12+
*
13+
* Example: ["port-forwarding", "workbench", "performance", "serverless"]
14+
*
15+
* The issues with both "port-forwarding" and "performance" labels, will
16+
* show up only in the` Port-forwarding` section since it has the higher
17+
* precedence over the "performance" label.
1218
*/
1319
trackLabels?: string[];
1420

21+
/**
22+
* List of mutually exclusive[1] priority labels with descending priority[2].
23+
* Example: ["p0", "p1", "p2", "p3"]
24+
* - [1]: No `p0` and `p1` can be assigned at the same time.
25+
* - [2]: Label in [N-th] array position has higher precendence then
26+
* any item in the rest of the list. `p1` has higher priority
27+
* than `p3` in the example above.
28+
*
29+
* These labels will be rendered as a label on the list items
30+
* to signify the priority of the item.
31+
*/
32+
priorityLabels?: string[];
33+
1534
/**
1635
* If to render issues as check list using the [x] markers.
1736
*

src/interfaces/TArraySortResult.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export enum TArraySortResult {
2+
FirstEarlier = -1,
3+
SecondEarlier = 0,
4+
Equal = 0
5+
}

src/octokit/ProjectsOctoKit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { OctoKitBase } from './OctoKitBase';
22
import { parseIssueApiUrl, parseIssueUrl } from '../utils/parseIssueUrl';
33
import { parseFileUrl } from '../utils/parseFileUrl';
4-
import { notEmpty } from '../utils/notEmpty';
4+
import { notEmpty } from '../utils/functional/notEmpty';
55

66
import { IRepoSourceConfig } from '../interfaces/IRepoSourceConfig';
77
import { TColumnCard } from '../interfaces/TColumnCard';

src/utils/emojiIcon.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { ident } from '../views/ident';
2+
3+
export const emojiIcon = (icon: string, title?: string) => {
4+
const iconString = `${icon}${ident(1)}`;
5+
if (!title) {
6+
return iconString;
7+
}
8+
9+
return `<i title="${title}">${iconString}</i>`;
10+
};
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/utils/functional/toLowerCase.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export const toLowerCase = (str: string) => {
3+
return str.toLowerCase();
4+
};

0 commit comments

Comments
 (0)