From b2dfbe5426bbbae3c5922f8629430bae1253ff9f Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Fri, 13 Jun 2025 03:02:43 -0400 Subject: [PATCH 01/19] Add script to check last_updated metadata in FAQ files --- scripts/check-last-updated.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/check-last-updated.js diff --git a/scripts/check-last-updated.js b/scripts/check-last-updated.js new file mode 100644 index 0000000000..e01a2b2e33 --- /dev/null +++ b/scripts/check-last-updated.js @@ -0,0 +1,32 @@ +const { execSync } = require("child_process"); +const fs = require("fs"); + +const FAQ_DIR = "content/resources/faq/questions/"; +const GIT_RANGE = "HEAD~1..HEAD"; + +function getChangedFiles() { + const output = execSync(`git diff --name-only ${GIT_RANGE}`).toString(); + return output.split("\n").filter(f => f.startsWith(FAQ_DIR) && f.endsWith(".md")); + } + + function didUpdateLastUpdated(filePath) { + const diffOutput = execSync(`git diff ${GIT_RANGE} -- ${filePath}`).toString(); + return diffOutput.includes("last_updated:"); + } + + const changedFiles = getChangedFiles(); +let failed = false; + +for (const file of changedFiles) { + if (!didUpdateLastUpdated(file)) { + console.error(`❌ Error: ${file} was modified but 'last_updated' was not updated.`); + failed = true; + } +} + +if (failed) { + console.error("\nPlease update the 'last_updated' field in all modified FAQ files."); + process.exit(1); // ❌ fail the script +} else { + console.log("βœ… All modified FAQ files have updated 'last_updated' fields."); +} From ea218d9ec8e92e393f4d97d8f079d7abf6b8f6f4 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Fri, 13 Jun 2025 03:04:12 -0400 Subject: [PATCH 02/19] Made some change to a 1005-and1006.. file to test the last updated check --- .../resources/faq/questions/1005-and-1006-vs-1405-and-1406.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/resources/faq/questions/1005-and-1006-vs-1405-and-1406.md b/content/resources/faq/questions/1005-and-1006-vs-1405-and-1406.md index 86f007456a..156e7551cf 100644 --- a/content/resources/faq/questions/1005-and-1006-vs-1405-and-1406.md +++ b/content/resources/faq/questions/1005-and-1006-vs-1405-and-1406.md @@ -1,5 +1,5 @@ --- -title: "What is the difference between COMP 1005/1006 and COMP 1405/1406?" +title: "What is the difference COMP 1005/1006 and COMP 1405/1406?" date: 2024-10-06T00:00:00Z last_updated: 2024-10-06T00:00:00Z draft: true From 2ce83f0c7440b11f75a28568574902effe710756 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Fri, 13 Jun 2025 03:06:36 -0400 Subject: [PATCH 03/19] Test commit without updating last_updated --- .../resources/faq/questions/1005-and-1006-vs-1405-and-1406.md | 2 +- content/resources/faq/questions/comp1405-t-section.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/resources/faq/questions/1005-and-1006-vs-1405-and-1406.md b/content/resources/faq/questions/1005-and-1006-vs-1405-and-1406.md index 156e7551cf..86f007456a 100644 --- a/content/resources/faq/questions/1005-and-1006-vs-1405-and-1406.md +++ b/content/resources/faq/questions/1005-and-1006-vs-1405-and-1406.md @@ -1,5 +1,5 @@ --- -title: "What is the difference COMP 1005/1006 and COMP 1405/1406?" +title: "What is the difference between COMP 1005/1006 and COMP 1405/1406?" date: 2024-10-06T00:00:00Z last_updated: 2024-10-06T00:00:00Z draft: true diff --git a/content/resources/faq/questions/comp1405-t-section.md b/content/resources/faq/questions/comp1405-t-section.md index 9f6a3cad5f..1eff629e3a 100644 --- a/content/resources/faq/questions/comp1405-t-section.md +++ b/content/resources/faq/questions/comp1405-t-section.md @@ -1,5 +1,5 @@ --- -title: "What is the COMP 1405 T Section?" +title: "What i" date: 2024-10-06T00:00:00Z last_updated: 2024-10-06T00:00:00Z draft: true From 8a0fb0b88014974b8de772d745a6e505450d2e36 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Fri, 13 Jun 2025 03:09:37 -0400 Subject: [PATCH 04/19] Test commit without updating last_updated --- .../faq/questions/comp1405-t-section.md | 2 +- scripts/check-last-updated.js | 29 ++++++++++--------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/content/resources/faq/questions/comp1405-t-section.md b/content/resources/faq/questions/comp1405-t-section.md index 1eff629e3a..9f6a3cad5f 100644 --- a/content/resources/faq/questions/comp1405-t-section.md +++ b/content/resources/faq/questions/comp1405-t-section.md @@ -1,5 +1,5 @@ --- -title: "What i" +title: "What is the COMP 1405 T Section?" date: 2024-10-06T00:00:00Z last_updated: 2024-10-06T00:00:00Z draft: true diff --git a/scripts/check-last-updated.js b/scripts/check-last-updated.js index e01a2b2e33..2f192f43e2 100644 --- a/scripts/check-last-updated.js +++ b/scripts/check-last-updated.js @@ -2,31 +2,34 @@ const { execSync } = require("child_process"); const fs = require("fs"); const FAQ_DIR = "content/resources/faq/questions/"; -const GIT_RANGE = "HEAD~1..HEAD"; +const GIT_RANGE = "HEAD^..HEAD"; // ← safer comparison function getChangedFiles() { const output = execSync(`git diff --name-only ${GIT_RANGE}`).toString(); - return output.split("\n").filter(f => f.startsWith(FAQ_DIR) && f.endsWith(".md")); - } + const files = output.split("\n").filter(f => f.startsWith(FAQ_DIR) && f.endsWith(".md")); + console.log("πŸ” Detected changed files:", files); // ← debug log + return files; +} - function didUpdateLastUpdated(filePath) { +function didUpdateLastUpdated(filePath) { const diffOutput = execSync(`git diff ${GIT_RANGE} -- ${filePath}`).toString(); + console.log(`πŸ”Ž Diff for ${filePath}:\n${diffOutput}`); // ← debug log return diffOutput.includes("last_updated:"); - } +} - const changedFiles = getChangedFiles(); +const changedFiles = getChangedFiles(); let failed = false; for (const file of changedFiles) { - if (!didUpdateLastUpdated(file)) { - console.error(`❌ Error: ${file} was modified but 'last_updated' was not updated.`); - failed = true; - } + if (!didUpdateLastUpdated(file)) { + console.error(`❌ Error: ${file} was modified but 'last_updated' was not updated.`); + failed = true; + } } if (failed) { - console.error("\nPlease update the 'last_updated' field in all modified FAQ files."); - process.exit(1); // ❌ fail the script + console.error("\nPlease update the 'last_updated' field in all modified FAQ files."); + process.exit(1); } else { - console.log("βœ… All modified FAQ files have updated 'last_updated' fields."); + console.log("βœ… All modified FAQ files have updated 'last_updated' fields."); } From e609e56fc529287718eb781b8dcadb76cf6bc49a Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Fri, 13 Jun 2025 03:10:48 -0400 Subject: [PATCH 05/19] Test commit without updating last_updated --- content/resources/faq/questions/comp1405-t-section.md | 2 +- scripts/check-last-updated.js | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/content/resources/faq/questions/comp1405-t-section.md b/content/resources/faq/questions/comp1405-t-section.md index 9f6a3cad5f..277a0cac85 100644 --- a/content/resources/faq/questions/comp1405-t-section.md +++ b/content/resources/faq/questions/comp1405-t-section.md @@ -1,5 +1,5 @@ --- -title: "What is the COMP 1405 T Section?" +title: "What is the C" date: 2024-10-06T00:00:00Z last_updated: 2024-10-06T00:00:00Z draft: true diff --git a/scripts/check-last-updated.js b/scripts/check-last-updated.js index 2f192f43e2..e7e143092d 100644 --- a/scripts/check-last-updated.js +++ b/scripts/check-last-updated.js @@ -12,11 +12,16 @@ function getChangedFiles() { } function didUpdateLastUpdated(filePath) { - const diffOutput = execSync(`git diff ${GIT_RANGE} -- ${filePath}`).toString(); - console.log(`πŸ”Ž Diff for ${filePath}:\n${diffOutput}`); // ← debug log - return diffOutput.includes("last_updated:"); + const diffOutput = execSync(`git diff ${GIT_RANGE} -- ${filePath}`).toString(); + const lines = diffOutput.split("\n"); + + return lines.some(line => + (line.startsWith("+") || line.startsWith("-")) && + line.includes("last_updated:") + ); } + const changedFiles = getChangedFiles(); let failed = false; From aca9d596825ec14243b43043e18d204800008b62 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Fri, 13 Jun 2025 03:11:20 -0400 Subject: [PATCH 06/19] Test commit without updating last_updated --- content/resources/faq/questions/comp1405-t-section.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/resources/faq/questions/comp1405-t-section.md b/content/resources/faq/questions/comp1405-t-section.md index 277a0cac85..a35ff8db71 100644 --- a/content/resources/faq/questions/comp1405-t-section.md +++ b/content/resources/faq/questions/comp1405-t-section.md @@ -1,7 +1,7 @@ --- -title: "What is the C" +title: "What is the COMP 1405 T Section?" date: 2024-10-06T00:00:00Z -last_updated: 2024-10-06T00:00:00Z +last_updated: 2024-11-06T00:00:00Z draft: true layout: faq-question summary: "" From 6752b3f3d8cbbae721c3c798f731d538543dc381 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 14:55:31 -0400 Subject: [PATCH 07/19] Testing on one of the articles --- content/resources/articles/first-year-course-selection-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/resources/articles/first-year-course-selection-guide.md b/content/resources/articles/first-year-course-selection-guide.md index 18ff0a63c0..3c4c72e777 100644 --- a/content/resources/articles/first-year-course-selection-guide.md +++ b/content/resources/articles/first-year-course-selection-guide.md @@ -4,7 +4,7 @@ date: 2025-06-02T00:00:00Z last_updated: 2025-06-02T00:00:00Z draft: false layout: article-question -summary: "An overview of recommended first-year COMP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." +summary: "An overview of first-year COMP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." contributors: - "test" sources: From 4ed54747b98d2be9fd7d53892a40ab1b52be4635 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 14:58:23 -0400 Subject: [PATCH 08/19] Testing on one of the articles --- .../articles/first-year-course-selection-guide.md | 2 +- scripts/check-last-updated.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/content/resources/articles/first-year-course-selection-guide.md b/content/resources/articles/first-year-course-selection-guide.md index 3c4c72e777..18ff0a63c0 100644 --- a/content/resources/articles/first-year-course-selection-guide.md +++ b/content/resources/articles/first-year-course-selection-guide.md @@ -4,7 +4,7 @@ date: 2025-06-02T00:00:00Z last_updated: 2025-06-02T00:00:00Z draft: false layout: article-question -summary: "An overview of first-year COMP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." +summary: "An overview of recommended first-year COMP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." contributors: - "test" sources: diff --git a/scripts/check-last-updated.js b/scripts/check-last-updated.js index 059f11d25b..1d79c2a00d 100644 --- a/scripts/check-last-updated.js +++ b/scripts/check-last-updated.js @@ -16,9 +16,19 @@ function getChangedFiles() { function didUpdateLastUpdated(filePath) { const diffOutput = execSync(`git diff ${GIT_RANGE} -- ${filePath}`).toString(); - return diffOutput.includes("last_updated:"); + + const lastUpdatedLines = diffOutput + .split('\n') + .filter(line => line.includes("last_updated:")); + + // Check if there's both a removed (-) and added (+) line + const hasRemoved = lastUpdatedLines.some(line => line.startsWith("-")); + const hasAdded = lastUpdatedLines.some(line => line.startsWith("+")); + + return hasRemoved && hasAdded; } + const changedFiles = getChangedFiles(); let failed = false; From c88b46ca25a228894503f8e5e5d75338487c2f75 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 15:26:16 -0400 Subject: [PATCH 09/19] Testing CI check for last_updated --- .github/workflows/check-last-updated.yml | 28 +++++++++++++++++++ .../first-year-course-selection-guide.md | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/check-last-updated.yml diff --git a/.github/workflows/check-last-updated.yml b/.github/workflows/check-last-updated.yml new file mode 100644 index 0000000000..85447ca550 --- /dev/null +++ b/.github/workflows/check-last-updated.yml @@ -0,0 +1,28 @@ +name: Check Last Updated Fields + +on: + pull_request: + paths: + - 'content/resources/faq/questions/**' + - 'content/resources/articles/**' + push: + branches: + - main + paths: + - 'content/resources/faq/questions/**' + - 'content/resources/articles/**' + +jobs: + check-last-updated: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Run Last Updated Check + run: node scripts/check-last-updated.js diff --git a/content/resources/articles/first-year-course-selection-guide.md b/content/resources/articles/first-year-course-selection-guide.md index 18ff0a63c0..768860187b 100644 --- a/content/resources/articles/first-year-course-selection-guide.md +++ b/content/resources/articles/first-year-course-selection-guide.md @@ -4,7 +4,7 @@ date: 2025-06-02T00:00:00Z last_updated: 2025-06-02T00:00:00Z draft: false layout: article-question -summary: "An overview of recommended first-year COMP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." +summary: "An overview of recomme, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." contributors: - "test" sources: From 96a0dd601c13852309cec58f06613c4ef69e8d88 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 15:27:02 -0400 Subject: [PATCH 10/19] Testing CI check for last_updated --- content/resources/articles/first-year-course-selection-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/resources/articles/first-year-course-selection-guide.md b/content/resources/articles/first-year-course-selection-guide.md index 768860187b..18ff0a63c0 100644 --- a/content/resources/articles/first-year-course-selection-guide.md +++ b/content/resources/articles/first-year-course-selection-guide.md @@ -4,7 +4,7 @@ date: 2025-06-02T00:00:00Z last_updated: 2025-06-02T00:00:00Z draft: false layout: article-question -summary: "An overview of recomme, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." +summary: "An overview of recommended first-year COMP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." contributors: - "test" sources: From 432124c43a2d4cebcbe5242a953b610a6974026e Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 15:28:14 -0400 Subject: [PATCH 11/19] Testing CI check for last_updated --- .github/workflows/check-last-updated.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-last-updated.yml b/.github/workflows/check-last-updated.yml index 85447ca550..2c6e5d9a10 100644 --- a/.github/workflows/check-last-updated.yml +++ b/.github/workflows/check-last-updated.yml @@ -7,7 +7,7 @@ on: - 'content/resources/articles/**' push: branches: - - main + - '**' paths: - 'content/resources/faq/questions/**' - 'content/resources/articles/**' From 635b5658a11305be28923c99d70d55bb2febd51f Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 15:28:46 -0400 Subject: [PATCH 12/19] Testing CI check for last_updated --- content/resources/articles/first-year-course-selection-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/resources/articles/first-year-course-selection-guide.md b/content/resources/articles/first-year-course-selection-guide.md index 18ff0a63c0..20a0c26be2 100644 --- a/content/resources/articles/first-year-course-selection-guide.md +++ b/content/resources/articles/first-year-course-selection-guide.md @@ -4,7 +4,7 @@ date: 2025-06-02T00:00:00Z last_updated: 2025-06-02T00:00:00Z draft: false layout: article-question -summary: "An overview of recommended first-year COMP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." +summary: "An overviP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." contributors: - "test" sources: From 1567e000272573b825bb1a3fb6d5304342cc1879 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 15:33:58 -0400 Subject: [PATCH 13/19] Updated the last updated check --- .../articles/first-year-course-selection-guide.md | 2 +- scripts/check-last-updated.js | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/content/resources/articles/first-year-course-selection-guide.md b/content/resources/articles/first-year-course-selection-guide.md index 20a0c26be2..18ff0a63c0 100644 --- a/content/resources/articles/first-year-course-selection-guide.md +++ b/content/resources/articles/first-year-course-selection-guide.md @@ -4,7 +4,7 @@ date: 2025-06-02T00:00:00Z last_updated: 2025-06-02T00:00:00Z draft: false layout: article-question -summary: "An overviP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." +summary: "An overview of recommended first-year COMP, MATH, and elective courses, along with common scheduling options to help you plan your timetable effectively." contributors: - "test" sources: diff --git a/scripts/check-last-updated.js b/scripts/check-last-updated.js index 1d79c2a00d..a9b4f2cb7a 100644 --- a/scripts/check-last-updated.js +++ b/scripts/check-last-updated.js @@ -46,8 +46,14 @@ for (const file of changedFiles) { } if (failed) { - console.error("\nPlease update the 'last_updated' field in all modified FAQ/article files."); - process.exit(1); + console.error("\n❌ CI FAILED: The following files were modified without updating 'last_updated':"); + for (const file of changedFiles) { + if (!didUpdateLastUpdated(file)) { + console.error(` β€’ ${file}`); + } + } + + throw new Error("🚫 Commit rejected: 'last_updated' must be updated for each modified FAQ/article."); } else { console.log("βœ… All modified FAQ/article files have updated 'last_updated' fields."); -} +} \ No newline at end of file From 5e36eece9e484f92be9abe7589d99f1b946930c1 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 15:35:09 -0400 Subject: [PATCH 14/19] Test: missing last_updated update --- .../articles/should-you-take-z-section-2000-level-comp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/resources/articles/should-you-take-z-section-2000-level-comp.md b/content/resources/articles/should-you-take-z-section-2000-level-comp.md index 079e090a59..748d964724 100644 --- a/content/resources/articles/should-you-take-z-section-2000-level-comp.md +++ b/content/resources/articles/should-you-take-z-section-2000-level-comp.md @@ -4,7 +4,7 @@ date: 2025-06-16T00:00:00Z last_updated: 2025-06-16T00:00:00Z draft: false layout: article-question -summary: "Taking the accelerated COMP 1405 Z section enables you to take 2000-level COMP courses earlier, but it’s not necessarily the right choice for everyone." +summary: ", but it’s not necessarily the right choice for everyone." contributors: - Matthew MacRae-Bovell - Aditya "Jacc" Padmakar From 4f8c37b58520b3d00890bacc2e256cd814681149 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 15:35:48 -0400 Subject: [PATCH 15/19] Test: missing last_updated update --- .../articles/should-you-take-z-section-2000-level-comp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/resources/articles/should-you-take-z-section-2000-level-comp.md b/content/resources/articles/should-you-take-z-section-2000-level-comp.md index 748d964724..079e090a59 100644 --- a/content/resources/articles/should-you-take-z-section-2000-level-comp.md +++ b/content/resources/articles/should-you-take-z-section-2000-level-comp.md @@ -4,7 +4,7 @@ date: 2025-06-16T00:00:00Z last_updated: 2025-06-16T00:00:00Z draft: false layout: article-question -summary: ", but it’s not necessarily the right choice for everyone." +summary: "Taking the accelerated COMP 1405 Z section enables you to take 2000-level COMP courses earlier, but it’s not necessarily the right choice for everyone." contributors: - Matthew MacRae-Bovell - Aditya "Jacc" Padmakar From 9c2821e99e4125eb3e8eba76885c9e348d575b1a Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 16:11:15 -0400 Subject: [PATCH 16/19] Test: missing last_updated update --- .../articles/should-you-take-z-section-2000-level-comp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/resources/articles/should-you-take-z-section-2000-level-comp.md b/content/resources/articles/should-you-take-z-section-2000-level-comp.md index 079e090a59..96b7e2389c 100644 --- a/content/resources/articles/should-you-take-z-section-2000-level-comp.md +++ b/content/resources/articles/should-you-take-z-section-2000-level-comp.md @@ -4,7 +4,7 @@ date: 2025-06-16T00:00:00Z last_updated: 2025-06-16T00:00:00Z draft: false layout: article-question -summary: "Taking the accelerated COMP 1405 Z section enables you to take 2000-level COMP courses earlier, but it’s not necessarily the right choice for everyone." +summary: "Taking the acc section enables you to take 2000-level COMP courses earlier, but it’s not necessarily the right choice for everyone." contributors: - Matthew MacRae-Bovell - Aditya "Jacc" Padmakar From 980abfdff5c38fad1732dfef4672c18dd43642eb Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 16:23:39 -0400 Subject: [PATCH 17/19] Updated yml for check lastest updated date --- .github/workflows/check-last-updated.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-last-updated.yml b/.github/workflows/check-last-updated.yml index 2c6e5d9a10..d74cfa782c 100644 --- a/.github/workflows/check-last-updated.yml +++ b/.github/workflows/check-last-updated.yml @@ -18,6 +18,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + fetch-depth: 2 - name: Setup Node.js uses: actions/setup-node@v3 From 431882261f07aa19daddf5cdb347db71bdf2983a Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 16:25:24 -0400 Subject: [PATCH 18/19] Updated yml for check lastest updated date --- .../articles/should-you-take-z-section-2000-level-comp.md | 2 +- scripts/check-last-updated.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/resources/articles/should-you-take-z-section-2000-level-comp.md b/content/resources/articles/should-you-take-z-section-2000-level-comp.md index 96b7e2389c..079e090a59 100644 --- a/content/resources/articles/should-you-take-z-section-2000-level-comp.md +++ b/content/resources/articles/should-you-take-z-section-2000-level-comp.md @@ -4,7 +4,7 @@ date: 2025-06-16T00:00:00Z last_updated: 2025-06-16T00:00:00Z draft: false layout: article-question -summary: "Taking the acc section enables you to take 2000-level COMP courses earlier, but it’s not necessarily the right choice for everyone." +summary: "Taking the accelerated COMP 1405 Z section enables you to take 2000-level COMP courses earlier, but it’s not necessarily the right choice for everyone." contributors: - Matthew MacRae-Bovell - Aditya "Jacc" Padmakar diff --git a/scripts/check-last-updated.js b/scripts/check-last-updated.js index a9b4f2cb7a..7e6da3f422 100644 --- a/scripts/check-last-updated.js +++ b/scripts/check-last-updated.js @@ -3,8 +3,8 @@ const fs = require("fs"); const GIT_RANGE = "HEAD~1..HEAD"; const TARGET_DIRS = [ - "content/resources/faqs/questions/", - "content/resources/articles/" + "content/resources/faqs/**", + "content/resources/articles/**" ]; function getChangedFiles() { From 9e6cdfd89443df5d10c30629eddbd6f3bb672e92 Mon Sep 17 00:00:00 2001 From: b4shk1r Date: Wed, 18 Jun 2025 16:28:18 -0400 Subject: [PATCH 19/19] Updated yml to have the latest paths --- .github/workflows/check-last-updated.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-last-updated.yml b/.github/workflows/check-last-updated.yml index d74cfa782c..71877fd87f 100644 --- a/.github/workflows/check-last-updated.yml +++ b/.github/workflows/check-last-updated.yml @@ -3,13 +3,13 @@ name: Check Last Updated Fields on: pull_request: paths: - - 'content/resources/faq/questions/**' + - 'content/resources/faq/**' - 'content/resources/articles/**' push: branches: - '**' paths: - - 'content/resources/faq/questions/**' + - 'content/resources/faq/**' - 'content/resources/articles/**' jobs: