Docs: --commit-id publishes the changes in that commit, not since it (publish.md example uses github.event.before)
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- azure, github-actions, typescript
- Domain
- cli, documentation
Research direction
Start with docs/commands/publish.md and compare its --commit-id description and GitHub Actions example with src/services/git-diff-service.ts and the generated workflow references in src/templates/github-actions/publish-workflow.ts. Update the wording and example to match the behavior described in the issue; clarify the multiple-commit case if appropriate. Done when the docs accurately explain which commit is published and use the matching GitHub Actions value.
Written by the indexing model from the issue text.
Description
docs/commands/publish.md describes --commit-id differently from what the code and the generated pipelines do.
Docs (Incremental publish):
When
--commit-idis provided,apiops publishusesgit diffto 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.
- Dominant language
- TypeScript
- Stars
- 44
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/apiops-cli
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
Azure/apiops-cli#350 ·
-
extract fails when a policy uses set-backend-service backend-id="{{namedValue}}"Possibly taken @dannyward630 claimed this 37 days ago. Openstale type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Azure/apiops-cli#331 · 1 comment ·
-
Docs example says products are auto-included transitively, but they aren't extracted with `products: []`Possibly taken @cdayne claimed this 27 days ago. Openstale type:question
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Azure/apiops-cli#277 · 1 comment ·
-
Extractor mistakes set-body json response as transitive dependency which causes pipeline failureOpentype:bug
Difficulty 3/5 1-2 days Newbie friendliness 56/100
Azure/apiops-cli#349 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Azure/apiops-cli#345 ·
All issues in Azure/apiops-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
tashfeenahmed/freellmapi#2217 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
remotion-dev/skills#37 ·
-
gui: a narrow window's gateway key row with a line under it wraps its faded badges onto blank linesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Slider: Escape during a thumb drag keeps and commits the dragged value, unlike ui-sdk's other dragsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vercel-labs/ui#1758 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nicobailon/pi-subagents#3425 ·
Maintainers usually reply within 1 day