Skip to content

fix: pin đúng commit SHA cho pypa/gh-action-pypi-publish - #11

Merged
WindowScary321 merged 9 commits into
mainfrom
fix/release-publish
Nov 18, 2026
Merged

WindowScary321 merged 9 commits into
mainfrom
fix/release-publish

Conversation

@WindowScary321

Copy link
Copy Markdown
Owner
  • Sửa ref của pypa/gh-action-pypi-publish từ tag object SHA (106e0b0b7c337fa67ed433972f777c6357f78598) sang commit SHA thực tế (ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e) của v1.13.0 trong publish.yml và testpypi.yml.
  • Khắc phục lỗi docker run ghcr.io: manifest unknown do GHCR không gắn tag cho annotated tag object SHA.

- Sửa ref của pypa/gh-action-pypi-publish từ tag object SHA (106e0b0b7c337fa67ed433972f777c6357f78598)
  sang commit SHA thực tế (ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e) của v1.13.0 trong publish.yml và testpypi.yml.
- Khắc phục lỗi docker run ghcr.io: manifest unknown do GHCR không gắn tag cho annotated tag object SHA.
@WindowScary321 WindowScary321 self-assigned this Oct 26, 2026
@WindowScary321

WindowScary321 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner Author

Commit 37d32d8 — feat: chọn API v2 mặc định và hỗ trợ biến môi trường

Thay đổi (code + test + tài liệu):

  • Thêm MYFAP_API_VER, nhận v1 hoặc v2. Thứ tự ưu tiên: --api-version, biến môi trường, version trong session, rồi v2.
  • Session cũ thiếu version vẫn dùng v1. Version session không hợp lệ bị chặn khi login nếu không chỉ định version hợp lệ; đổi version vẫn yêu cầu handshake và kiểm tra binding.
  • doctor không đọc session; chọn version theo option, biến môi trường, rồi v2. Cập nhật hướng dẫn và regression.

Kiểm tra:

  • uv run --locked --group ci python -m unittest discover -s tests: 428 test, 424 đạt / 4 skip, exit 0, dùng dữ liệu tổng hợp.
  • git diff --check: exit 0.
  • Đã push commit lên fix/release-publish. Chưa kiểm thử backend live trong lượt này; chưa merge hoặc phát hành.

@WindowScary321

Copy link
Copy Markdown
Owner Author

Commit 1e240df — docs: lưu trữ tài liệu lịch sử vào history

Thay đổi:

  • Gom nội dung 10 tài liệu lịch sử Phase 0–4 và kế hoạch migration vào history.md, giữ đường dẫn gốc, mốc commit và các giới hạn kiểm chứng.
  • Xóa các file gốc sau khi lưu trữ; cập nhật các liên kết liên quan trong tài liệu còn giữ.

Kiểm tra:

  • Đối chiếu nội dung lưu trữ với commit gốc và kiểm tra 46 liên kết nội bộ liên quan: exit 0.
  • git diff --cached --check: exit 0. Không chạy test runtime vì chỉ thay tài liệu.
  • Commit hiện mới ở local, chưa push; không merge hoặc phát hành.

@WindowScary321

Copy link
Copy Markdown
Owner Author

Commit 649f1f2 — docs: dẫn lịch sử tới commit gốc

Thay đổi:

  • Đặt danh sách lịch sử tại docs/history.md, liên kết trực tiếp tới 10 file trong commit 467df1e trước khi xóa.
  • Xóa bản lưu nội dung tại gốc và cập nhật các liên kết liên quan tới đúng file trong commit cũ.

Kiểm tra:

  • git cat-file -t xác nhận 10 đích tồn tại trong commit gốc, exit 0.
  • git diff --cached --check: exit 0. Không chạy test runtime vì chỉ sửa tài liệu.
  • Commit được tạo trên fix/release-publish; đang push nhánh, chưa merge hoặc phát hành.

@WindowScary321

Copy link
Copy Markdown
Owner Author

Cập nhật PR #11 — Commit 25758ad và 933da6f (fix/release-publish)

Commit đã push:

  • 25758ad: docs: chỉnh sửa 1 số docs và readme (README.md, docs/discovery/2026-10-19-pr8-bug-handoff.md).
  • 933da6f: fix: chặn sớm operation v1 không hỗ trợ và kiểm tra chặt option/parser CLI (12 file: .gitignore, myfap/{api,auth,cli,parsers}.py, docs/cli/{Example,v2-contracts}.md, tests/{test_auth_lifecycle,test_cli_options,test_cli_version,test_parsers,test_phase6_reads}.py).

Thay đổi chính ở 933da6f:

  • Capability v1 (myfap/cli.py): require_operation() kiểm tra operation in READ_OPERATIONS trước auth.load_session() khi chạy ở v1, chặn sớm lệnh v2-only (other feedbacks) để không thực hiện handshake/ghi đè session v2 sang v1.
  • Kiểm tra option & tham số (myfap/cli.py, myfap/auth.py, myfap/api.py):
    • Chuyển các kiểm tra truthiness sang is not None và chặn chuỗi rỗng/khoảng trắng/ký tự điều khiển (--config, --campus, --output, --semester, --courseid, --subjectcode, --classname, --date), giữ ưu tiên --campus ở lệnh con login và đặt min=1 cho --week/--year.
    • Đồng bộ _validate_semester()/_validate_text() cho các method MyFapClient; chặn tổ hợp xung đột marks --courseid ... --semester ....
  • Parser & xuất file (myfap/parsers.py, myfap/cli.py):
    • convert_schedule_to_ics() xử lý null/None ở roomNo, groupName, sessionNo, lecturer thay vì xuất chuỗi "None".
    • save_output() lọc thêm : và ký tự cấm trên Windows (<>:"/\|?*, ký tự điều khiển); marks --pretty hỗ trợ thẻ <TABLE> không phân biệt hoa thường.
  • Tài liệu & cấu hình: Cập nhật help exams --full, ví dụ --help trong docs/cli/Example.md, ghi chú docs/cli/v2-contracts.md và thêm dist-*/ vào .gitignore.
  • Regression test: Cập nhật tests/test_cli_version.py và bổ sung test cho capability v1 trên other feedbacks, option rỗng/xung đột, save_output, marks --pretty và ICS null fields.

Kiểm tra đã chạy (sau lần sửa cuối của 933da6f):

  • uv run --locked --group ci python -m unittest tests/test_cli_options.py tests/test_cli_version.py tests/test_phase6_reads.py tests/test_parsers.py tests/test_auth_lifecycle.py -v: 120/120 đạt, exit 0.
  • uv sync --locked --group ci và uv run --locked --group ci python -m unittest discover -s tests -v: 435 test, 431 đạt / 4 skip (3 skip tạo symlink thiếu quyền + 1 skip mode POSIX trên Windows), exit 0.
  • git diff --check / git diff --cached --check: exit 0.

Giới hạn:

  • Kiểm thử hoàn toàn trên dữ liệu tổng hợp và mock HTTP/browser (offline); chưa chạy kiểm chứng live FEID/FAP hoặc build/Twine/pip smoke lại sau commit này.
  • Nhánh chưa merge; vẫn cần xử lý tag v0.2.0 hiện đang trỏ tới cdcb7c1 sau khi PR fix: pin đúng commit SHA cho pypa/gh-action-pypi-publish #11 được duyệt/merge để kích hoạt pipeline phát hành.

@WindowScary321
WindowScary321 marked this pull request as ready for review November 18, 2026 04:01
@WindowScary321
WindowScary321 merged commit 94ee7fe into main Nov 18, 2026
11 checks passed
@WindowScary321
WindowScary321 deleted the fix/release-publish branch November 18, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant