Skip to content

chore: add cmd aliases - #1066

Merged
mbevc1 merged 1 commit into
mainfrom
20260731_cmd_alias
Jul 31, 2026
Merged

mbevc1 merged 1 commit into
mainfrom
20260731_cmd_alias

Conversation

@mbevc1

@mbevc1 mbevc1 commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor
  • Following customer request adding PR commands aliases to match attestation records.
  • Use same file name patterns

Checklist

@mbevc1 mbevc1 added customer-request For issues reported/inspired by customers - solution reported via community slack and to customer go Pull requests that update go code labels Jul 31, 2026
@claude

claude Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @mbevc1's task in 1m 35s —— View job


Review: PR #1066 — cmd aliases

  • Gather context (diff, related commands)
  • Static analysis (go build, go vet — both pass ✅)
  • Review changes
  • Post feedback

This is a clean, low-risk change. It adds pull_request / merge_request aliases (snake_case, matching the attestation-record type naming) to both the attest pullrequest and assert pullrequest parent commands, and renames assertPullrequest.go → assertPR.go to match the attestPR.go file-name pattern. 👍

What I verified

  • ✅ go build ./... and go vet ./cmd/kosli/ pass.
  • ✅ Both alias lists are now identical (pr, pull_request, mr, mergerequest, merge_request) — before this PR they differed in order/content, so this is a nice consistency win.
  • ✅ The new pull_request alias lines up with the existing type naming used elsewhere (root.go:279 help text lists pull_request as an attestation type; pullrequest.go:31 posts to the .../pull_request endpoint).
  • ✅ No autogenerated docs under cmd/kosli/testdata/output/docs/ reference these aliases, so nothing needs regenerating there. Worth a quick make docs (or your doc-gen target) locally just to confirm the published help/docs pick up the new aliases, per the PR checklist.

Minor observations (non-blocking)

  • No test asserts the alias set, so a typo or accidental removal wouldn't be caught. Optional, but a tiny table test (e.g. assert newAttestPRCmd/newAssertPRCmd contains each expected alias) would lock this in cheaply. Given how trivial the change is, this is genuinely optional.
  • Cobra treats aliases as an unordered lookup, so ordering is purely cosmetic — no functional concern. Grouping them logically (pr, pull_request then mr, mergerequest, merge_request) reads well.

Nit: consider mirroring this snake_case alias addition on any related PR subcommands if customers expect it consistently — but the parent-command aliases resolve regardless of subcommand, so this is fine as-is.

No blocking issues — LGTM. ✅

@mbevc1
mbevc1 enabled auto-merge (squash) July 31, 2026 12:13
Comment thread cmd/kosli/assertPR.go
@mbevc1
mbevc1 merged commit ae189a4 into main Jul 31, 2026
20 checks passed
@mbevc1
mbevc1 deleted the 20260731_cmd_alias branch July 31, 2026 13:01
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
kosli-cli 2.36.4

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>- Added `pull_request`, `merge_request` as additional command aliases for `assert pullrequest` and `attest pullrequest` (alongside existing `pr`, `mr`, `mergerequest`).
- Fixed a bug where packaging multiple evidence paths (e.g. `--attachments`) would fail with "operation not permitted" when any attachment was owned by a different user (e.g. files written by a Docker container). Ownership is no longer preserved during staging.
- Improved error messages when an evidence attachment path cannot be packaged: the error now names the path the user provided rather than an internal temp directory.

## What's Changed
* chore: add cmd aliases by @mbevc1 in kosli-dev/cli#1066
* test(aws): add S3 contract tests by @mbevc1 in kosli-dev/cli#1065
* fix(docs): separate flag types into a column by @mbevc1 in kosli-dev/cli#1068
* chore(deps): bump the github-actions-dependencies group with 2 updates by @dependabot[bot] in kosli-dev/cli#1070
* chore(deps): bump the go-dependencies group with 10 updates by @dependabot[bot] in kosli-dev/cli#1071
* fix(attest): don't preserve file ownership when packaging attachments by @mbevc1 in kosli-dev/cli#1076


**Full Changelog**: https://github.com/kosli-dev/cli/compare/v2.36.3...v2.36.4</pre>
  <p>View the full release notes at <a href="https://github.com/kosli-dev/cli/releases/tag/v2.36.4">https://github.com/kosli-dev/cli/releases/tag/v2.36.4</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!15762
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-request For issues reported/inspired by customers - solution reported via community slack and to customer go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants