Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.2.0 #147

Open
wants to merge 137 commits into
base: main
Choose a base branch
from
Open

Version 0.2.0 #147

wants to merge 137 commits into from

Conversation

winstonsung
Copy link
Collaborator

@winstonsung winstonsung commented Oct 7, 2024

Summary by CodeRabbit

Based on the comprehensive summary, here are the updated release notes:

  • New Features

    • Added localization support for Traditional Chinese (zh-Hant) language.
    • Introduced new system message and language tag management.
    • Enhanced configuration and maintenance infrastructure.
    • Added support for Discord bot and website entry points.
    • Implemented a new JSON schema for database tables and diagram layout.
  • Dependencies

    • Updated multiple Python package versions.
    • Upgraded Flask, MySQL Connector, and Py-cord libraries.
    • Updated development dependencies like Black, Pylint, and Pytest.
  • Infrastructure

    • Added new GitHub Actions workflows for testing, linting, and merging.
    • Introduced comprehensive configuration and service wiring mechanisms.
    • Enhanced database schema and table definitions.
  • Documentation

    • Updated CONTRIBUTING.md with improved coding conventions.
    • Refined README.md for better clarity and organization.
    • Added HISTORY.md and RELEASE-NOTES-0.2.md for version tracking.
  • Testing

    • Added new unit and integration tests for language tag and service wiring functionality.

iach526526 and others added 30 commits August 27, 2024 19:56
Change-Id: I8926fc26ee263ce9446adccae7cf191330f9f593
Change-Id: I4bcd6e7c3f13ae8a4211e275dc1723346161d913
Change-Id: Ib6dad0232b13b1e88ce3519f10b63e29aac2e905
Bug: #51
Change-Id: If695821600dfeccc9f9e91548a5b6237a323812c
Change-Id: Id9cd8d4ce8fc949c51679b38f158f1bfc740a8f0
Change-Id: Ie78f7be00bfff17c88f4aabbcec28823b1bd6ed1
Change-Id: I27770b2ff249842ab8bfbc8f7905e1213fb7c9fb
Change-Id: I15b6a1fd2595151c0454d6c1f9fe23f89de17d1e
Bumps [idna](https://github.com/kjd/idna) from 3.7 to 3.8.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](kjd/idna@v3.7...v3.8)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Change-Id: I14c9859111c02d2f330a02767a9be826db7f9444
winstonsung added a commit that referenced this pull request Dec 2, 2024
Bug: #147
Change-Id: I04dbfb2269ba2c7ba9068e1e4417067285b945eb
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 32a1029 and c786866.

📒 Files selected for processing (9)
  • .github/workflows/black.yml (1 hunks)
  • .github/workflows/merge.yml (1 hunks)
  • .github/workflows/notion.yml (1 hunks)
  • .github/workflows/pylint.yml (1 hunks)
  • .github/workflows/pytest.yml (1 hunks)
  • .github/workflows/unittest.yml (1 hunks)
  • HISTORY.md (1 hunks)
  • RELEASE-NOTES-0.2.md (1 hunks)
  • pyproject.toml (2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/unittest.yml

28-28: shellcheck reported issue in this script: SC2046:warning:1:20: Quote this to prevent word splitting

(shellcheck)

.github/workflows/merge.yml

33-33: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details

(expression)

.github/workflows/pylint.yml

28-28: shellcheck reported issue in this script: SC2046:warning:1:8: Quote this to prevent word splitting

(shellcheck)

.github/workflows/black.yml

33-33: shellcheck reported issue in this script: SC2046:warning:1:7: Quote this to prevent word splitting

(shellcheck)


43-43: shellcheck reported issue in this script: SC2035:info:1:9: Use ./glob or -- glob so names with dashes won't become options

(shellcheck)

🪛 LanguageTool
HISTORY.md

[style] ~363-~363: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ture. * Added channel member display. * Added CTF features. * Updated CTF features (W...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~372-~372: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...the support ticket embed description. * Updated to limit the usage of daily change comm...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~376-~376: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dded support for bot status/presence. * Added zap emoji. * Added total point status d...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~377-~377: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...t status/presence. * Added zap emoji. * Added total point status display. * Updated C...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~386-~386: Consider using a different verb for a more formal wording.
Context: ...e Analytics. ### Bug fixes in 0.1.1 * Fixed the problem of bot responding to self m...

(FIX_RESOLVE)

RELEASE-NOTES-0.2.md

[uncategorized] ~51-~51: Possible missing comma found.
Context: .... Localisations are updated regularly. Below only new and removed languages are list...

(AI_HYDRA_LEO_MISSING_COMMA)

🪛 Markdownlint (0.35.0)
HISTORY.md

5-5: null
Multiple top-level headings in the same document

(MD025, single-title, single-h1)

🔇 Additional comments (13)
.github/workflows/notion.yml (1)

5-5: Purr-fectly formatted YAML! 😺

Meow! The removal of extra spaces within the array brackets makes the YAML more consistent and cleaner. This formatting change doesn't affect functionality but improves readability. paws up

.github/workflows/pytest.yml (1)

27-29: ⚠️ Potential issue

Purr! The step name doesn't match its action 🐾

The step is named "Analysing the code with Pylint" but it's actually running pytest.

-      - name: Analysing the code with Pylint
+      - name: Run pytest
         run: |
-          pytest tests/pytest/
+          pytest tests/pytest/ -v --cov=. --cov-report=xml

Likely invalid or redundant comment.

.github/workflows/unittest.yml (1)

27-29: ⚠️ Potential issue

Another case of mistaken identity! swishes tail

The step is named "Analysing the code with Pylint" but it's running unittest.

-      - name: Analysing the code with Pylint
+      - name: Run unittest
         run: |
+          # Ensure test files exist
+          if ! git ls-files 'tests/unittest/*.py' > /dev/null; then
+            echo "No test files found!"
+            exit 1
+          fi
           python -m unittest $(git ls-files 'tests/unittest/*.py')

Likely invalid or redundant comment.

🧰 Tools
🪛 actionlint (1.7.4)

28-28: shellcheck reported issue in this script: SC2046:warning:1:20: Quote this to prevent word splitting

(shellcheck)

RELEASE-NOTES-0.2.md (1)

5-5: 🧹 Nitpick (assertive)

Meow! Let's make this warning purr-fectly visible! 😺

Add some emphasis to catch everyone's attention:

-THIS IS NOT A RELEASE YET
+⚠️ THIS IS NOT A RELEASE YET ⚠️

Likely invalid or redundant comment.

pyproject.toml (2)

8-8: Purr-fect version bump! 😺

The version bump to 0.2.0 correctly reflects the breaking changes introduced by the MySQL Connector Python upgrade.


31-33: ⚠️ Potential issue

Meow! Major dependency updates need attention! 🐱

Significant version updates detected:

  • Flask: 3.0.3 → 3.1.0
  • MySQL Connector Python: 8.4.0 → 9.1.0 (Major version bump!)
  • py-cord: 2.6.0 → 2.6.1

Let's check for any MySQL-related code that might need updates:

✅ Verification successful

After analyzing the MySQL usage patterns in the codebase, I can provide a final response:

Purr-fectly safe to upgrade! 😺

The codebase uses basic MySQL operations that are compatible across major versions:

  • Standard SQL syntax for INSERT, UPDATE, SELECT statements
  • Simple cursor operations (execute, fetchone, fetchall)
  • No usage of deprecated features or complex MySQL-specific functionality

The upgrade from MySQL 8.x to 9.x doesn't affect these fundamental operations. All SQL queries follow standard patterns that remain stable across versions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for MySQL connection and query patterns
echo "=== Checking MySQL usage patterns ==="
rg -A 5 "mysql\.connector|cursor\.|execute\(" --type py

# Look for potential breaking changes in MySQL 9.x
echo -e "\n=== Checking for potential breaking changes ==="
ast-grep --pattern 'cursor.$_($$$)' --lang python

Length of output: 29910

.github/workflows/merge.yml (2)

1-18: Purr-fect workflow setup! 😺

The workflow is well-configured with:

  • Appropriate trigger on review submission
  • Required permissions for contents and pull requests
  • Proper checks for review approval and author association

30-34: ⚠️ Potential issue

Hiss! Watch out for those untrusted inputs! 🙀

Using github.event.* directly in Git commands could be dangerous. Let's make it safer:

      - name: Rebase to target branch when needed in order to fast-forward merge
+       env:
+         BASE_REF: ${{ github.event.pull_request.base.ref }}
+         HEAD_REPO: ${{ github.event.pull_request.head.repo.clone_url }}
+         HEAD_REF: ${{ github.event.pull_request.head.ref }}
        run: |
-         git fetch origin ${{ github.event.pull_request.base.ref }}
-         git rebase origin/${{ github.event.pull_request.base.ref }}
+         git fetch origin "$BASE_REF"
+         git rebase "origin/$BASE_REF"
      - name: Push back source branch (head)
        run: |
-         git push "${{ github.event.pull_request.head.repo.clone_url }}" HEAD:${{ github.event.pull_request.head.ref }} --force
+         git push "$HEAD_REPO" HEAD:"$HEAD_REF" --force

Likely invalid or redundant comment.

🧰 Tools
🪛 actionlint (1.7.4)

33-33: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details

(expression)

HISTORY.md (5)

15-15: Purr... These placeholder sections need attention! 🐱

The placeholder sections with "..." entries should either be filled with actual changes or removed if no changes were made.

Also applies to: 73-73, 131-131, 189-189, 247-247, 305-305


51-51: Meow! Let's be precise about language support! 🐱

The statement "Localisations are updated regularly" seems inconsistent with having only one supported language.

Also applies to: 109-109, 167-167, 225-225, 283-283, 341-341, 393-393


401-406: 🛠️ Refactor suggestion

Purr... Let's clarify the database migration journey! 🐱

The database migration entries would be clearer if structured chronologically:

-* Added JSON file as initial database.
-* Updated to use JSON file to get CTF maker role ID.
-* Added SQL database.
-* Migrated user.json to SQL database.
-* Renamed SQL column name from `user_id` to `uid`.
-* Dropped support for `user.json`, use SQL database instead.
+### Database Evolution
+1. Initial JSON Implementation:
+   * Introduced JSON file as initial database
+   * Extended JSON storage for CTF maker role ID
+2. SQL Migration:
+   * Implemented SQL database infrastructure
+   * Migrated user data from JSON to SQL
+   * Optimized schema: Renamed `user_id` to `uid`
+3. Completion:
+   * Deprecated JSON storage in favor of SQL database

Likely invalid or redundant comment.


1-5: 🧹 Nitpick (assertive)

Meow! The document structure needs improvement! 🐱

Having multiple top-level headings (#) can cause confusion. Consider restructuring:

-# History
-
-Change notes from older releases. For current info, see RELEASE-NOTES-0.2.
-
-# SCAICT-uwu 0.1
+# SCAICT-uwu Version History
+
+> Change notes from older releases. For current info, see RELEASE-NOTES-0.2.
+
+## Version 0.1

Likely invalid or redundant comment.

🧰 Tools
🪛 Markdownlint (0.35.0)

5-5: null
Multiple top-level headings in the same document

(MD025, single-title, single-h1)


359-379: 🧹 Nitpick (assertive)

Purr... Let's organize these features better! 🐱

The user-facing features would be clearer if grouped by functionality:

 ### New user-facing features in 0.1.1
 
+#### Voice & Communication
 * Added dynamic voice channel and support ticket feature.
 * Added channel member display.
-* Added CTF features.
-* Updated CTF features (WIP, can create and list).
 * Added independent update channels.
+
+#### CTF System
+* Implemented core CTF functionality
+* Enhanced CTF system with creation and listing capabilities
+* Completed CTF features
+
+#### Store & Economy
 * Rewrote the daily charge feature.
-* Completed CTF features.
+* Implemented SCAICT Store with lottery slot feature
+* Added total point status display
+
+#### Web Interface
 * Added initial website using Flask.
-* Completed course role features.
-* Updated design of SCAICT Store.
+
+#### Role Management
+* Implemented course role management system

Likely invalid or redundant comment.

🧰 Tools
🪛 LanguageTool

[style] ~363-~363: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ture. * Added channel member display. * Added CTF features. * Updated CTF features (W...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~372-~372: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...the support ticket embed description. * Updated to limit the usage of daily change comm...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~376-~376: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dded support for bot status/presence. * Added zap emoji. * Added total point status d...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~377-~377: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...t status/presence. * Added zap emoji. * Added total point status display. * Updated C...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

.github/workflows/pylint.yml Show resolved Hide resolved
.github/workflows/pytest.yml Show resolved Hide resolved
.github/workflows/unittest.yml Show resolved Hide resolved
RELEASE-NOTES-0.2.md Show resolved Hide resolved
.github/workflows/merge.yml Show resolved Hide resolved
.github/workflows/black.yml Show resolved Hide resolved
.github/workflows/black.yml Show resolved Hide resolved
.github/workflows/black.yml Show resolved Hide resolved
dependabot bot added 5 commits January 16, 2025 11:05
Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.8.30 to 2024.12.14.
- [Commits](certifi/python-certifi@2024.08.30...2024.12.14)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [aiosignal](https://github.com/aio-libs/aiosignal) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/aio-libs/aiosignal/releases)
- [Changelog](https://github.com/aio-libs/aiosignal/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiosignal@v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: aiosignal
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [attrs](https://github.com/sponsors/hynek) from 24.2.0 to 24.3.0.
- [Commits](https://github.com/sponsors/hynek/commits)

---
updated-dependencies:
- dependency-name: attrs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.3 to 2.3.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.2.3...2.3.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dc1c35 and 7da7120.

📒 Files selected for processing (1)
  • requirements.txt (1 hunks)
🔇 Additional comments (4)
requirements.txt (4)

15-15: Careful with that MarkupSafe upgrade! swats paw 🐾

The leap from MarkupSafe 2.x to 3.0.2 is a major version bump that could affect template escaping behavior.


17-17: Purr-fect time to mention a big change! 😺

The MySQL Connector upgrade from 8.x to 9.x is a major version bump that could have breaking changes in database connectivity.


1-7: Meow! Watch out for those async changes! 😺

The jump to aiohttp 3.11.x brings some changes that need attention:

  • New connection pooling behavior
  • Updated SSL/TLS handling
  • Changes to client session lifecycle

*paws at the version numbers* Let me check your async code:


1-23: Let's make sure these dependencies are as safe as catnip! 😺

I'll help check for any known vulnerabilities:

✅ Verification successful

Purr-fect news! Your dependencies are feline fine! 😺

All your packages are using versions that include the latest security patches:

  • Flask 3.1.0 is well above any known vulnerable versions
  • aiohttp 3.11.11 is safely ahead of the latest vulnerable version (3.10.10)
  • mysql-connector-python 9.1.0 includes the fix for the latest connector takeover vulnerability
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for known vulnerabilities in dependencies
# Note: Using GitHub API since pip-audit isn't available in sandbox

gh api graphql -f query='
query {
  securityVulnerabilities(first: 10, ecosystem: PIP, package: "flask") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}
'

# Repeat for other major dependencies (aiohttp, mysql-connector-python)

Length of output: 1369


Script:

#!/bin/bash
# Check aiohttp vulnerabilities
gh api graphql -f query='
query {
  securityVulnerabilities(first: 10, ecosystem: PIP, package: "aiohttp") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}
'

# Check mysql-connector-python vulnerabilities
gh api graphql -f query='
query {
  securityVulnerabilities(first: 10, ecosystem: PIP, package: "mysql-connector-python") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}
'

Length of output: 3997

requirements.txt Outdated Show resolved Hide resolved
dependabot bot added 5 commits January 16, 2025 11:41
Bumps [click](https://github.com/pallets/click) from 8.1.7 to 8.1.8.
- [Release notes](https://github.com/pallets/click/releases)
- [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst)
- [Commits](pallets/click@8.1.7...8.1.8)

---
updated-dependencies:
- dependency-name: click
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](pallets/jinja@3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [astroid](https://github.com/pylint-dev/astroid) from 3.3.5 to 3.3.8.
- [Release notes](https://github.com/pylint-dev/astroid/releases)
- [Changelog](https://github.com/pylint-dev/astroid/blob/main/ChangeLog)
- [Commits](pylint-dev/astroid@v3.3.5...v3.3.8)

---
updated-dependencies:
- dependency-name: astroid
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](pylint-dev/pylint@v3.3.2...v3.3.3)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [charset-normalizer](https://github.com/jawah/charset_normalizer) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/jawah/charset_normalizer/releases)
- [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md)
- [Commits](jawah/charset_normalizer@3.4.0...3.4.1)

---
updated-dependencies:
- dependency-name: charset-normalizer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
winstonsung added a commit that referenced this pull request Jan 16, 2025
Bug: #147
Change-Id: I04dbfb2269ba2c7ba9068e1e4417067285b945eb
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
requirements_dev.txt (1)

Line range hint 1-17: Purr-fect dev dependency updates! 😺

All version bumps are minor and properly pinned. However, let's make this file more organized!

Consider grouping related packages with comments:

+ # Formatting and linting
astroid == 3.3.8
black == 24.10.0
pylint == 3.3.3

+ # Testing
pytest == 8.3.4
iniconfig == 2.0.0
pluggy == 1.5.0

+ # Development utilities
click == 8.1.8
packaging == 24.2
platformdirs == 4.3.6
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7da7120 and 463f7bd.

📒 Files selected for processing (3)
  • pyproject.toml (1 hunks)
  • requirements.txt (1 hunks)
  • requirements_dev.txt (1 hunks)
🔇 Additional comments (4)
requirements.txt (3)

1-23: 🧹 Nitpick (assertive)

Time to organize this dependency ball of yarn! 🧶

While the version updates look good, let's make this file more maintainable.

Consider grouping related packages:

+ # HTTP and networking
aiohappyeyeballs == 2.4.4
aiohttp == 3.11.11
requests == 2.32.3

+ # Web framework and templating
flask == 3.1.0
jinja2 == 3.1.5
werkzeug == 3.1.3

+ # Database
mysql-connector-python == 9.1.0

+ # Discord integration
py-cord == 2.6.1

Likely invalid or redundant comment.


15-15: Careful with that MarkupSafe upgrade! swats paw 🐾

The jump from MarkupSafe 2.x to 3.0.2 is a major version bump that could affect template escaping behavior.

Let me check your templates:

✅ Verification successful

Purr-fectly safe to upgrade MarkupSafe! 😺

Your templates only use simple variable interpolation, and you're already using the latest Flask and Jinja2 versions which are compatible with MarkupSafe 3.x. No custom template filters or direct MarkupSafe usage found that could be affected by the upgrade.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Look for Jinja2 templates that might be affected
fd . -e html -e jinja2 --exec grep -l '{{' {} \;

# Check for custom template filters that might need updates
ast-grep --pattern 'def $filter($args):
  $$$
  markupsafe.$func($$$)
  $$$
'

Length of output: 177


Script:

#!/bin/bash
# Check template contents
echo "=== Template Contents ==="
for f in ./templates/*.html; do
  echo "--- $f ---"
  cat "$f"
done

# Check for markupsafe imports and usage
echo -e "\n=== MarkupSafe Usage ==="
rg "from markupsafe|import markupsafe" -A 2

# Check for Flask/Jinja2 dependencies
echo -e "\n=== Related Dependencies ==="
grep -E "flask|jinja2" requirements.txt

Length of output: 27822


17-17: Meow! Major MySQL upgrade ahead! 😺

The MySQL Connector upgrade from 8.x to 9.x is a significant change that requires careful testing.

Let me help check the database code:

✅ Verification successful

Purr-fect news! This MySQL upgrade is safer than I thought! 😺

After inspecting the codebase, I found only basic MySQL connection code with standard parameters. No complex operations or distributed usage that could be affected by the version upgrade. Just remember to test the basic database connectivity after the upgrade!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for MySQL connection patterns and potential breaking changes
ast-grep --pattern 'mysql.connector.connect(
  $$$
)'

# Look for cursor usage that might be affected
ast-grep --pattern 'cursor = $$$
$cursor.execute($$$)'

Length of output: 430


Script:

#!/bin/bash
# Check mysql connector imports
rg "import.*mysql\.connector" -A 2

# Look for error handling patterns
ast-grep --pattern 'try:
  $$$
except mysql.connector.$_:
  $$$'

# Search for any MySQL-related configuration
rg -i "mysql|database" --type yaml --type ini --type conf

Length of output: 273


Script:

#!/bin/bash
# Look for any SQL queries or database operations
rg "execute|fetchall|fetchone|commit|rollback" cog/core/secret.py -A 2

# Check if there are any other files using the database connection
rg "get_db_connection" 

Length of output: 95

pyproject.toml (1)

39-41: Purr-fect development tool updates! 🐱

The updates to black, pylint, and pytest look good. These are all minor version bumps.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 463f7bd and 9b8b4ba.

📒 Files selected for processing (3)
  • HISTORY.md (1 hunks)
  • RELEASE-NOTES-0.2.md (1 hunks)
  • pyproject.toml (2 hunks)
🧰 Additional context used
🪛 LanguageTool
HISTORY.md

[style] ~363-~363: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ture. * Added channel member display. * Added CTF features. * Updated CTF features (W...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~372-~372: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...the support ticket embed description. * Updated to limit the usage of daily change comm...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~376-~376: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dded support for bot status/presence. * Added zap emoji. * Added total point status d...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~377-~377: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...t status/presence. * Added zap emoji. * Added total point status display. * Updated C...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~386-~386: Consider using a different verb for a more formal wording.
Context: ...e Analytics. ### Bug fixes in 0.1.1 * Fixed the problem of bot responding to self m...

(FIX_RESOLVE)

🪛 Markdownlint (0.37.0)
HISTORY.md

5-5: null
Multiple top-level headings in the same document

(MD025, single-title, single-h1)

🔇 Additional comments (7)
RELEASE-NOTES-0.2.md (1)

50-54: 🛠️ Refactor suggestion

Meow! Let's fix that grammar and add the new language! 😺

-SCAICT-uwu now supports 1 language. Localisations are updated regularly.
-
-Below only new and removed languages are listed.
-
-* …
+SCAICT-uwu now supports 1 language. Localisations are updated regularly,
+and below only new and removed languages are listed:
+
+* Added: Traditional Chinese (zh-hant)

Likely invalid or redundant comment.

pyproject.toml (3)

8-8: Purr-fect version bump to 0.2.0! 😺

The version increment aligns with the breaking changes from MySQL Connector Python 9.x upgrade.


39-41: Purr-fect dev tool updates! 🐾

Development dependencies are up-to-date with the latest stable versions:

  • black 24.10.0
  • pylint 3.3.3
  • pytest 8.3.4

31-33: Verify compatibility with updated dependencies! 🐱

Major updates detected:

  • Flask 3.1.0: Check for breaking changes
  • MySQL Connector Python 9.1.0: Major version bump
  • py-cord 2.6.1: Minor update

Run this script to check for potential issues:

✅ Verification successful

Purr-fect news! These dependency updates look safe! 😺

  • Flask routes use stable patterns compatible with 3.x
  • MySQL Connector 9.1.0 actually fixes a security vulnerability 🛡️
  • py-cord usage follows modern patterns with Bot class
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check PyPI for any known issues with these versions
echo "=== Checking Flask 3.1.0 ==="
curl -s https://pypi.org/pypi/flask/3.1.0/json | jq '.info.summary'

echo -e "\n=== Checking MySQL Connector Python 9.1.0 ==="
curl -s https://pypi.org/pypi/mysql-connector-python/9.1.0/json | jq '.info.summary'

# Check for security advisories
echo -e "\n=== Checking for security advisories ==="
gh api graphql -f query='
{
  securityVulnerabilities(first: 5, ecosystem: PIP, package: "mysql-connector-python") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
    }
  }
}'

Length of output: 1629


Script:

#!/bin/bash
# Check Flask usage patterns
echo "=== Checking Flask Usage Patterns ==="
ast-grep --pattern 'from flask import $_'
ast-grep --pattern '@app.route($_)'

echo -e "\n=== Checking MySQL Connection Patterns ==="
ast-grep --pattern 'mysql.connector.connect'

echo -e "\n=== Checking Discord Bot Patterns ==="
ast-grep --pattern 'import discord'
ast-grep --pattern 'discord.Bot'
ast-grep --pattern 'discord.Client'

Length of output: 1571

HISTORY.md (3)

401-406: 🧹 Nitpick (assertive)

Purr... Let's clarify the database migration journey! 🐱

-* Added JSON file as initial database.
-* Updated to use JSON file to get CTF maker role ID.
-* Added SQL database.
-* Migrated user.json to SQL database.
-* Renamed SQL column name from `user_id` to `uid`.
-* Dropped support for `user.json`, use SQL database instead.
+### Database Migration
+1. Initial Implementation:
+   * Introduced JSON-based storage for initial database needs
+   * Utilized JSON file for CTF maker role ID storage
+2. SQL Migration:
+   * Introduced SQL database infrastructure
+   * Migrated user data from JSON to SQL format
+   * Schema improvement: Renamed column `user_id` to `uid`
+3. Completion:
+   * Fully deprecated JSON storage in favor of SQL database

Likely invalid or redundant comment.


1-4: 🧹 Nitpick (assertive)

Meow! Consider adding more context to the introduction! 🐱

-# History
-
-Change notes from older releases. For current info, see RELEASE-NOTES-0.2.
+# Project History
+
+This document tracks historical changes for SCAICT-uwu versions 0.1.0 through 0.1.7.
+For information about current releases (0.2.0 and newer), please refer to RELEASE-NOTES-0.2.
+
+We follow Semantic Versioning (MAJOR.MINOR.PATCH). See https://semver.org for details.

Likely invalid or redundant comment.


359-379: 🧹 Nitpick (assertive)

Meow! Let's make the feature descriptions more consistent! 🐱

 ### New user-facing features in 0.1.1
 
+#### Voice & Support Features
 * Added dynamic voice channel and support ticket feature.
 * Added channel member display.
-* Added CTF features.
-* Updated CTF features (WIP, can create and list).
+
+#### CTF System
+* Implemented core CTF functionality
+* Enhanced CTF system with creation and listing capabilities
 * Added independent update channels.
+
+#### Store & Economy
 * Rewrote the daily charge feature.
-* Completed CTF features.
+* Implemented SCAICT Store with lottery slot feature
+* Added total point status display
+
+#### Web Interface
 * Added initial website using Flask.
-* Completed course role features.
-* Updated design of SCAICT Store.
+
+#### Role Management
+* Implemented course role management system

Likely invalid or redundant comment.

🧰 Tools
🪛 LanguageTool

[style] ~363-~363: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ture. * Added channel member display. * Added CTF features. * Updated CTF features (W...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~372-~372: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...the support ticket embed description. * Updated to limit the usage of daily change comm...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~376-~376: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dded support for bot status/presence. * Added zap emoji. * Added total point status d...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~377-~377: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...t status/presence. * Added zap emoji. * Added total point status display. * Updated C...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

RELEASE-NOTES-0.2.md Show resolved Hide resolved
HISTORY.md Outdated Show resolved Hide resolved
Change-Id: I1f1b09d0b0846423c641d4a673dd4f8f0aa4fb2c
Change-Id: I7e8ddecc2ed30925defb3ecc0d17661119bb5b97
Change-Id: Ie6a048cb4962897a3b1af972f5925f4e4aa6c21e
Change-Id: Id4f370144a0cc2b47d8a2d3a37d7b6b1e39ce0d6
Change-Id: If1eb47626bffb27314b2b9248c063c45843332cc
winstonsung added a commit that referenced this pull request Jan 16, 2025
Bug: #147
Change-Id: I04dbfb2269ba2c7ba9068e1e4417067285b945eb
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9b8b4ba and 5a0add1.

📒 Files selected for processing (5)
  • .gitignore (1 hunks)
  • HISTORY.md (1 hunks)
  • RELEASE-NOTES-0.2.md (1 hunks)
  • pyproject.toml (2 hunks)
  • requirements.txt (1 hunks)
🧰 Additional context used
🪛 LanguageTool
HISTORY.md

[style] ~495-~495: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ture. * Added channel member display. * Added CTF features. * Updated CTF features (W...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~504-~504: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...the support ticket embed description. * Updated to limit the usage of daily change comm...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~508-~508: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dded support for bot status/presence. * Added zap emoji. * Added total point status d...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~509-~509: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...t status/presence. * Added zap emoji. * Added total point status display. * Updated C...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~518-~518: Consider using a different verb for a more formal wording.
Context: ...e Analytics. ### Bug fixes in 0.1.1 * Fixed the problem of bot responding to self m...

(FIX_RESOLVE)

RELEASE-NOTES-0.2.md

[style] ~53-~53: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Updated jinja2 from 3.1.4 to 3.1.5. * Updated markupsafe from 2.1.5 to 3.0.2. * Upd...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~54-~54: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ted markupsafe from 2.1.5 to 3.0.2. * Updated werkzeug from 3.0.4 to 3.1.3. * Updated...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~55-~55: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Updated werkzeug from 3.0.4 to 3.1.3. * Updated mysql-connector-python from 8.4.0 to 9....

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...connector-python from 8.4.0 to 9.1.0. * Updated py-cord from 2.6.0 to 2.6.1. * Update...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~57-~57: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...pdated py-cord from 2.6.0 to 2.6.1. * Updated aiohappyeyeballs from 2.4.0 to 2.4.4. ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~58-~58: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ohappyeyeballs from 2.4.0 to 2.4.4. * Updated aiohttp from 3.10.5 to 3.11.11. * Upd...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ted aiohttp from 3.10.5 to 3.11.11. * Updated aiosignal from 1.3.1 to 1.3.2. * Upda...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~60-~60: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ated aiosignal from 1.3.1 to 1.3.2. * Updated attrs from 24.2.0 to 24.3.0. * Update...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~61-~61: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...pdated attrs from 24.2.0 to 24.3.0. * Updated frozenlist from 1.4.1 to 1.5.0. * Upd...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~62-~62: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ted frozenlist from 1.4.1 to 1.5.0. * Updated idna from 3.7 to 3.10. * Updated mult...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... * Updated idna from 3.7 to 3.10. * Updated multidict from 6.0.5 to 6.1.0. * Upda...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~64-~64: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ated multidict from 6.0.5 to 6.1.0. * Updated yarl from 1.9.4 to 1.18.3. * Updated re...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~65-~65: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... * Updated yarl from 1.9.4 to 1.18.3. * Updated requests dependencies. * Updated cert...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~66-~66: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...3. * Updated requests dependencies. * Updated certifi from 2024.7.4 to 2024.12.14. ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ertifi from 2024.7.4 to 2024.12.14. * Updated charset-normalizer from 3.3.2 to 3.4.1....

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~68-~68: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...set-normalizer from 3.3.2 to 3.4.1. * Updated idna from 3.7 to 3.10. * Updated urll...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~69-~69: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... * Updated idna from 3.7 to 3.10. * Updated urllib3 from 2.2.2 to 2.3.0. #### Chan...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~75-~75: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... Updated click from 8.1.7 to 8.1.8. * Updated packaging from 24.1 to 24.2. * Update...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~76-~76: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...pdated packaging from 24.1 to 24.2. * Updated platformdirs from 4.2.2 to 4.3.6. * Upd...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~77-~77: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ted platformdirs from 4.2.2 to 4.3.6. * Updated pylint from 3.2.6 to 3.3.3. * Updated...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~78-~78: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Updated pylint from 3.2.6 to 3.3.3. * Updated astroid from 3.2.4 to 3.3.8. * Update...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~79-~79: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...pdated astroid from 3.2.4 to 3.3.8. * Updated dill from 0.3.8 to 0.3.9. * Updated p...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~80-~80: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...* Updated dill from 0.3.8 to 0.3.9. * Updated platformdirs from 4.2.2 to 4.3.6. * Upd...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~81-~81: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ted platformdirs from 4.2.2 to 4.3.6. * Updated pytest from 8.3.2 to 8.3.4. * Updated...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~82-~82: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Updated pytest from 8.3.2 to 8.3.4. * Updated packaging from 24.1 to 24.2. #### Remo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🪛 Markdownlint (0.37.0)
HISTORY.md

5-5: null
Multiple top-level headings in the same document

(MD025, single-title, single-h1)

🔇 Additional comments (7)
requirements.txt (3)

1-24: Purr-fect alphabetical ordering! 😺

The dependencies are properly maintained in alphabetical order, as per project convention.


17-17: Careful with that MySQL Connector upgrade! swats paw 🐾

The leap from MySQL Connector 8.x to 9.1.0 is a major version bump that could have breaking changes in database connectivity.

Let me help check the database code:

✅ Verification successful

Purr-fectly safe MySQL upgrade! 😺

The upgrade to MySQL Connector 9.1.0 should be safe as a whisker! Your code only uses the basic connect() function with standard parameters in cog/core/secret.py. No fancy features that could break in the new version. Just remember to test the connection after upgrading! 🐾

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for MySQL connection patterns
ast-grep --pattern 'mysql.connector.connect(
  $$$
)'

Length of output: 373


Script:

#!/bin/bash
# Check for mysql.connector imports and usage
echo "=== MySQL Connector imports ==="
rg "import.*mysql\.connector" -A 2

echo -e "\n=== MySQL Connector usage patterns ==="
rg "mysql\.connector\." -g "!*.pyc" --no-heading

echo -e "\n=== Error handling patterns ==="
rg "mysql\.connector\.[A-Z][a-zA-Z]+Error" --no-heading

Length of output: 527


15-15: Heads up! Major version bump for MarkupSafe 🐾

The upgrade from MarkupSafe 2.x to 3.0.2 is a major version change that could affect template escaping behavior.

Let me check your templates:

✅ Verification successful

Purr-fectly safe to upgrade! 😺

The templates use only basic variable interpolation for displaying simple data like usernames and numbers. No complex escaping features or HTML content rendering that could be affected by the MarkupSafe version change.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Look for Jinja2 templates that might be affected
fd -e html -e jinja2 --exec grep -l '{{' {} \;

# Check for custom template filters that might need updates
ast-grep --pattern 'def $filter($args):
  $$$
  markupsafe.$func($$$)
  $$$
'

Length of output: 175


Script:

#!/bin/bash
# Check template contents
echo "=== slot.html ==="
cat templates/slot.html
echo -e "\n=== home.html ==="
cat templates/home.html

# Look for direct markupsafe imports and usage
echo -e "\n=== MarkupSafe imports and usage ==="
rg "(?i)markupsafe|markup_safe" -g "!requirements.txt"

# Look for escape/unescape patterns
echo -e "\n=== Escape/unescape patterns ==="
rg "escape|unescape|safe|markup" -g "*.py" -g "!requirements.txt"

Length of output: 24354

.gitignore (1)

22-28: Purr-fect virtual environment ignores! 😺

The new entries properly ignore Python virtual environment files and directories. The Chinese comments are well-formatted and helpful.

pyproject.toml (1)

8-8: Purr-fect version bump to 0.2.0! 😺

The version bump from 0.1.9.dev0 to 0.2.0 is appropriate given the breaking changes in dependencies (MySQL Connector 9.x and MarkupSafe 3.x).

RELEASE-NOTES-0.2.md (1)

102-104: 🛠️ Refactor suggestion

Meow! Let's fix that grammar and add the new language! 😺

-SCAICT-uwu now supports 1 language. Localisations are updated regularly.
-
-Below only new and removed languages are listed.
+SCAICT-uwu now supports 1 language. Localisations are updated regularly,
+and below only new and removed languages are listed:
+
+* Added: Traditional Chinese (zh-hant)

Likely invalid or redundant comment.

HISTORY.md (1)

533-538: 🧹 Nitpick (assertive)

Purr... Let's clarify the database migration journey! 🐱

-* Added JSON file as initial database.
-* Updated to use JSON file to get CTF maker role ID.
-* Added SQL database.
-* Migrated user.json to SQL database.
-* Renamed SQL column name from `user_id` to `uid`.
-* Dropped support for `user.json`, use SQL database instead.
+### Database Migration
+1. Initial Implementation:
+   * Introduced JSON-based storage for initial database needs
+   * Utilized JSON file for CTF maker role ID storage
+2. SQL Migration:
+   * Introduced SQL database infrastructure
+   * Migrated user data from JSON to SQL format
+   * Schema improvement: Renamed column `user_id` to `uid`
+3. Completion:
+   * Fully deprecated JSON storage in favor of SQL database

Likely invalid or redundant comment.

pyproject.toml Show resolved Hide resolved
RELEASE-NOTES-0.2.md Show resolved Hide resolved
HISTORY.md Show resolved Hide resolved
Change-Id: I6bb5dd1cc73186f5f2c056fd21b13608ae408822
Bug: #147
Change-Id: I04dbfb2269ba2c7ba9068e1e4417067285b945eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants