release-pr accepts a given version that is not above the current one or is already tagged

Đang mở
#130 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
73/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, typescript
Lĩnh vực
devops, release

Hướng nghiên cứu

Read src/release-pr/index.ts, starting at the forced version handling around lines 38, 81-83, and 139; compare it with the older-version check in self-release. Check how shared and independent package versions are selected and how formatted tags are checked. Done means release-pr rejects versions that are not above the current version or whose tag already exists; add or update tests for those cases.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
Issue description

The version input of release-pr is only checked for valid semver (src/release-pr/index.ts#L139, used as is at L38 and L81-L83). A typo still opens a release PR, and merging it goes wrong:

  • lower and never published: it is published as npm latest (the default pnpm publish tag), so installs get the older line;
  • already on npm: release skips the publish (src/release/index.ts#L65-L68), then hits the existing tag: createTag fails, or createRelease attaches the release to the old tag (#94);
  • tagged but not on npm (npm: false): the same tag problem.

Traced, not run. self-release already refuses to move back to an older version; release-pr doesn't.

Expected: release-pr fails when the given version is not above the current one (shared: the group's highest version; independent: each package's), or when its formatted tag already exists. Related to #94 and #95.

Found by a read-only audit of main at 435a16b (first done at 046494f; no src/ file changed in between), report audits/actions-2026-11-11.md in the workspace repo.

Code sample
const forced = getString("version") && assertVersion(getString("version"));
if (forced) return pkgs.map((pkg) => ({ pkg, version: forced, reason: "given version" }));
Versions
  • @nanoforge-dev/actions 3.3.0 (main at 435a16b)
  • Bun 1.3.14
Issue priority

Low (slightly annoying)

I have tested this issue on a development release

435a16b

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
15 giờ 51 phút
Pull request đã merge (30 ngày)
21

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NanoForge-dev/actions

Tất cả issue của NanoForge-dev/actions

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.