Skip to content

Commit 497d71d

Browse files
authored
Merge pull request #43 from LonoxX/develop
feat: settings profiles
2 parents 79c7490 + 46e656d commit 497d71d

25 files changed

Lines changed: 4312 additions & 2016 deletions

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,16 @@
1919
"author": "LonoxX",
2020
"license": "MIT",
2121
"devDependencies": {
22-
"@types/node": "^25.0.8",
23-
"@typescript-eslint/eslint-plugin": "^8.53.0",
24-
"@typescript-eslint/parser": "^8.53.0",
22+
"@types/node": "^25.3.0",
2523
"builtin-modules": "^5.0.0",
26-
"esbuild": "^0.27.2",
27-
"eslint": "^9.39.2",
28-
"obsidian": "^1.11.4",
24+
"esbuild": "^0.27.3",
25+
"obsidian": "^1.12.2",
26+
"prettier": "^3.8.1",
2927
"tslib": "^2.8.1",
3028
"typescript": "^5.9.3"
3129
},
3230
"dependencies": {
3331
"date-fns": "^4.1.0",
34-
"octokit": "^5.0.5",
35-
"prettier": "^3.7.4"
32+
"octokit": "^5.0.5"
3633
}
3734
}

src/cleanup-manager.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ export class CleanupManager {
3939
for (const file of files) {
4040
// Try to get number from frontmatter first (most reliable)
4141
const properties = extractProperties(this.app, file);
42+
43+
// Skip files that belong to a different type (e.g. PRs in a shared folder)
44+
if (properties.type === "pr") {
45+
continue;
46+
}
47+
4248
let fileNumberString: string | null = null;
4349

4450
if (properties.number) {
@@ -125,6 +131,12 @@ export class CleanupManager {
125131
for (const file of files) {
126132
// Try to get number from frontmatter first (most reliable)
127133
const properties = extractProperties(this.app, file);
134+
135+
// Skip files that belong to a different type (e.g. issues in a shared folder)
136+
if (properties.type === "issue") {
137+
continue;
138+
}
139+
128140
let fileNumberString: string | null = null;
129141

130142
if (properties.number) {

src/content-generator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export class ContentGenerator {
2525
subIssues?: any[],
2626
parentIssue?: any,
2727
): Promise<string> {
28-
// Determine whether to escape hash tags (repo setting takes precedence if ignoreGlobalSettings is true)
29-
const shouldEscapeHashTags = repo.ignoreGlobalSettings ? repo.escapeHashTags : settings.escapeHashTags;
28+
// Determine whether to escape hash tags (repo setting takes precedence if using a custom profile)
29+
const shouldEscapeHashTags = repo.profileId !== "default" ? repo.escapeHashTags : settings.escapeHashTags;
3030

3131
// Check if custom template is enabled and load template content
3232
if (repo.useCustomIssueContentTemplate && repo.issueContentTemplate) {
@@ -152,8 +152,8 @@ ${subIssues.map((si: any) => {
152152
settings: GitHubTrackerSettings,
153153
projectData?: ProjectData[],
154154
): Promise<string> {
155-
// Determine whether to escape hash tags (repo setting takes precedence if ignoreGlobalSettings is true)
156-
const shouldEscapeHashTags = repo.ignoreGlobalSettings ? repo.escapeHashTags : settings.escapeHashTags;
155+
// Determine whether to escape hash tags (repo setting takes precedence if using a custom profile)
156+
const shouldEscapeHashTags = repo.profileId !== "default" ? repo.escapeHashTags : settings.escapeHashTags;
157157

158158
// Check if custom template is enabled and load template content
159159
if (repo.useCustomPullRequestContentTemplate && repo.pullRequestContentTemplate) {

0 commit comments

Comments
 (0)