Repository navigation
feat(cli): expose review and comment commands - #326
Merged
Merged
Conversation
Regenerate schema.ts from the v2 OpenAPI spec, adding the review and comment endpoints exposed in argos-ci/argos#2287. Remove the unused legacy swagger-generated api.ts, which nothing imports. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add CLI coverage for the review and commenting surface exposed in the v2 REST API (argos-ci/argos#2287): - argos review list|create|dismiss - argos comment list|create|get|edit|delete|resolve|unresolve|react|unreact|subscribe|unsubscribe Refactor build-scoped commands into a generic, low-maintenance structure: one file per command under commands/{build,review,comment}/, with shared helpers in src/lib/ (build-reference parsing, project-path parsing, anchor/body resolution, the API client + unwrap, build-target auth resolution, the command runner, and pure formatters). Adding a new endpoint is now a ~15-line file. Includes 44 unit tests for the shared utils and review/comment e2e suites. BREAKING CHANGE: argos build review --conclusion <approve|request-changes> is replaced by argos review create --event <approve|reject|comment> [--body]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Trim both skills to the minimum an agent needs. argos-cli defers flag detail to `argos --help` and keeps only the token model and command map (its stale per-command references are removed). argos-pr-review becomes a tight overview plus an efficient review workflow, and now frames posting specific, anchored comments as the highest-value output of an agent review. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Vendor the skill-creator skill (from anthropics/skills) used to author and review the project's agent skills, tracked via skills-lock.json. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Convert every file under packages/cli/e2e from .js to .ts, including the
shared utils, which now export a typed run() and a CommandError class so
failure assertions get real types under strict mode.
Fix the failing "requires a body to create a comment" test: it passed a
build number without --project, so the command failed on project
resolution ("--project is required") before reaching the body check. Use
the build URL (which carries the project) so resolution succeeds and the
"A comment body is required" validation is exercised.
Update the e2e-oidc/e2e-tokenless scripts and the vitest include glob to
the .ts paths.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deep links like `.../builds/5014/347549006` (build number followed by a diff id, query, or hash) failed to parse because the URL regexp required the build number to be the last path segment. Treat anything after the build number as ignorable so any URL matching `.../builds/<number>` resolves to that build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Project-auth commands (e.g. `argos build get`) only looked at `--token` and `ARGOS_TOKEN`, so a user logged in via `argos login` got "No Argos project token found" even with a valid personal access token on disk. Fall back to the stored token, requiring an explicit one only when none is configured. The project and user token resolvers are now identical, so merge them into a single `resolveToken`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Each command lives in its own file, but `login.ts` defined both `login` and `logout`. Extract `logout` into `commands/logout.ts` and register it from the entrypoint. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The token resolver now emits a single "No Argos token found" message for both project- and user-auth commands; the build e2e tests still asserted the old "No Argos project token found" text. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Brings the
@argos-ci/cliup to date with the review + commenting surface exposed in the v2 REST API (argos-ci/argos#2287), and refactors the build-scoped commands into a generic, low-maintenance structure.New commands (all 14 newly-exposed endpoints)
argos review list|create|dismissargos comment list|create|get|edit|delete|resolve|unresolve|react|unreact|subscribe|unsubscribereview createuses--event approve|reject|commentwith an optional Markdown--body/--body-file.comment createsupports--reply-to,--diff+--anchor-point/--anchor-lines, and--draft(attach to a pending review).Refactor
One file per command under
src/commands/{build,review,comment}/, with shared logic insrc/lib/:build-reference/project— reference & slug parsinganchor/body— option parsing for commentsapi— client factory +unwrap(surfacesHTTP <status>even on bodyless error responses)target— build-target resolution with two auth modes (project token for build reads; personal access token for review/comment actions)run— the command runner, error handling, and JSON/text outputformat— pure formattersAdding a future endpoint is now a ~15-line file. The typed
openapi-fetchclient guarantees request shapes at compile time.Auth model
build get/build snapshots— project token (ARGOS_TOKEN/--token), project resolved from/projectwhen not given.review */comment *— personal access token (--token/ARGOS_TOKEN/argos login); project from the build URL or--project.Breaking change
argos build review --conclusion <approve|request-changes>→argos review create --event <approve|reject|comment> [--body].Also
api-clientschema.tsfrom the v2 spec; remove the unused legacyapi.ts.skill-creatordev skill (used to review the project's skills).Testing
pnpm --filter @argos-ci/cli test).review/commente2e suites (run in CI with live tokens).🤖 Generated with Claude Code