Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#333 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
azure, github-actions, typescript
Ambito
cli, documentation

Direzione di ricerca

Inizia da docs/commands/publish.md e confronta la descrizione di --commit-id e l’esempio di GitHub Actions con src/services/git-diff-service.ts e i riferimenti al workflow generato in src/templates/github-actions/publish-workflow.ts. Aggiorna la formulazione e l’esempio affinché corrispondano al comportamento descritto nell’issue; chiarisci il caso di più commit, se opportuno. Il lavoro è completato quando la documentazione spiega con precisione quale commit viene pubblicato e usa il valore GitHub Actions corrispondente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
34
Fork
13
Merge medio
3g 6h
PR unite (30g)
7

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/apiops-cli

Tutte le issue di Azure/apiops-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.