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

オープン 初心者向け
#333 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
azure, github-actions, typescript
領域
cli, documentation

調査の方向性

docs/commands/publish.mdから始め、--commit-idの説明とGitHub Actionsの例を、src/services/git-diff-service.tsおよびsrc/templates/github-actions/publish-workflow.ts内の生成されるworkflowへの参照と比較してください。issueに記載された動作に合うよう、文言と例を更新してください。必要に応じて、複数のcommitがある場合についても明確にしてください。ドキュメントで公開されるcommitが正確に説明され、一致するGitHub Actionsの値が使われていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
37
フォーク
14
平均マージ
3日 6時間
マージ済み PR(30日)
7

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/apiops-cli のほかの issue

Azure/apiops-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。