Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Docs: --commit-id publishes the changes in that commit, not since it (publish.md example uses github.event.before)

Đang mở Phù hợp với người mới
#333 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 3 ngày

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu với docs/commands/publish.md và so sánh mô tả về --commit-id cùng ví dụ GitHub Actions với src/services/git-diff-service.ts và các tham chiếu đến workflow được tạo trong src/templates/github-actions/publish-workflow.ts. Cập nhật cách diễn đạt và ví dụ cho khớp với hành vi được mô tả trong issue; nếu phù hợp, hãy làm rõ trường hợp có nhiều commit. Hoàn thành khi tài liệu giải thích chính xác commit nào được publish và sử dụng giá trị GitHub Actions tương ứng.

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

Mô tả

docs/commands/publish.md describes --commit-id differently from what the code and the generated pipelines do.

Docs (Incremental publish):

When --commit-id is provided, apiops publish uses git diff to identify which artifact files changed since that commit.

and the GitHub Actions example passes the commit before the push:

- run: npx apiops publish --commit-id ${{ github.event.before }}

Code (src/services/git-diff-service.ts) diffs commitId~1 against commitId, so it publishes the changes made by that commit, not the changes since it.

The generated pipelines agree with the code: the GitHub Actions template passes GITHUB_SHA (publish-workflow.ts) and the Azure DevOps template passes $(Build.SourceVersion).

Effect of following the docs example: with github.event.before, publish diffs the previous push's last commit against its parent. It republishes the previous push's last commit and skips the commit that just landed. The run succeeds, so nothing flags it.

Suggested fix: change the sentence to "identify which artifact files changed in that commit (compared with its parent)" and the example to --commit-id ${{ github.sha }}. If a push contains several commits, it may also be worth saying that only the last one is published, or supporting a range.

Seen on 1.0.5 (npm) and on main at 129fb32.

Ngôn ngữ chính
TypeScript
Star
34
Fork
13
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
7

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 Azure/apiops-cli

Tất cả issue của Azure/apiops-cli

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.