diff --git a/CHANGELOG.md b/CHANGELOG.md index f3aa71a..f369c05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.2.0] - 2026-11-16 + +### Breaking changes + +Three changes can break existing scripts. The details are in the entries below. + +- `COPIA_TOKEN` is sent only to the host that `--host` or `COPIA_HOST` names. With the host taken from the config file, the commands ignore it, use the stored token and print a warning. If you set only `COPIA_TOKEN` beside a config file, also set `COPIA_HOST` (#429) +- `api`: `-F` is now `--field`, which sends `true`, `false`, `null` and integers as JSON values and reads `@file`, while `-f` is `--raw-field`, which always sends a string, as in `gh`. `-f` still sends a string, but a script that used the long `--field` for a string, such as `--field n=1`, now sends a number and should use `--raw-field`. Both flags take one `key=value` per use, so a value with a comma is no longer split (#167) +- `--json` field names are the keys the commands print: `user` replaces `author` on `issue view`, `pr list` and `pr view`, and `stars_count` and `forks_count` replace `stars` and `forks` on `repo view` (#177) + ### Added - `repo collaborator remove --yes` removes a collaborator from a repository (`-R` or the current one); gh has no such command. Without `--yes` it fails with `--yes required when not running interactively` before anything else. It checks `GET /repos/{owner}/{repo}/collaborators/{login}` first, since Gitea answers 204 to a delete of a non-collaborator: a 404 fails with ` is not a collaborator of /`. Then it sends `DELETE /repos/{owner}/{repo}/collaborators/{login}` and prints `Removed from /`. A login that is not a Gitea login fails before the request; Copia's other refusals are shown with the HTTP status and its message (#50) @@ -117,10 +127,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `close-issues-on-merge.yml` moves to revision 2 of the organisation's canonical text (horde-ci baseline item 11): a closing keyword counts only at the start of a line of the PR body, optionally after a `-` or `*` list marker, so `security fix #32` inside a sentence no longer closes #32; an issue that cannot be closed fails the run instead of leaving a warning (#303) - `release upload` fails with `API error (HTTP )` when the release lookup answers anything other than 200 or 404, as `release delete` does. A 401, 403 or 500 lookup no longer posts the file to `/releases/0/assets` and reports a misleading `uploading : HTTP ` (#254) - `api --paginate` fails with `the next page link repeats an already fetched page: ""` when a `rel="next"` link names a page it already fetched, such as a link to the page itself or from page 2 back to page 1, instead of fetching pages forever. A table test now pins the next link origin check: plain `http://`, another port, a scheme-relative link to another host, an upper-case host and a trailing dot are refused before any request, and a `user@` link to the same host keeps the `token` header (#337) - - `.devcontainer/Dockerfile` builds the sandbox image from `golang:1.27.3-alpine`, the Go of `go.mod` and the root `Dockerfile`; with the image's `GOTOOLCHAIN=local`, `horde-dev run go test ./...` stopped with `go.mod requires go >= 1.27.3` and golangci-lint refused the module. `test/workflows` fails `go test ./...` when the `FROM golang:-alpine` line of either Dockerfile differs from the `go` directive of `go.mod`, or is missing (#356) - The snap carries the release version instead of `0+git.`: `snap/snapcraft.yaml` sets it in `override-build` from `git describe --tags --always` without the leading `v` (`adopt-info` and `craftctl set version`), since the release tags are lightweight and `version: git` ran `git describe` without `--tags`; the binary's `copia-cli --version` uses the same value. The snap is built for `amd64` only; `arm64` was listed but never built. A new `snap-pack` job in `ci.yml` packs the snap with snapcraft `9.x/stable` on every pull request and checks the `version` and `architectures` of its `meta/snap.yaml` (#364) - `snap.yml` publishes the snap without `snapcore/action-build` and `snapcore/action-publish`, which called snapcraft without a command (deprecated) and ran on node20. It runs two jobs on `ubuntu-24.04`. `build`, without secrets, checks the release version with `script/check-release-version.sh` right after a checkout without persisted credentials, runs the same `Install snapcraft` and `Pack snap` steps as `snap-pack`, fails unless the packed snap's `meta/snap.yaml` has name `copia-cli`, the tag's version and architectures `[amd64]`, and hands the snap on as an artifact with its sha256. `upload`, on a fresh runner without a checkout, checks the artifact's sha256 and `meta/snap.yaml` again and uploads it with `snapcraft upload --release stable`; `SNAPCRAFT_STORE_CREDENTIALS` is set on that step only, so the root build never shares a runner with it. `test/workflows` keeps the install and pack blocks identical, enforces the two jobs, rejects `if:` and `continue-on-error` in `snap.yml`, and fails on any `snapcore/` or `canonical/action-` action, also as a `docker://` image (#208) +- `issue create --label` and `issue edit --add-label` resolve names against the organization labels as well as the repository labels, so org-level labels can be attached; a repository label wins on a name clash. `issue create` now sends label IDs instead of raw names (#216) +- `issue edit --add-label` looks up label names on every page of the repository labels, so labels past the first 50 resolve instead of failing with "not found" (#246) +- `issue list` pages through results, so `--limit` above 50 returns up to that many issues instead of stopping at the first page; `--state` and `--label` apply to every page (#215) +- `pr list`, `repo list` (user and `--org`), `release list`, `search issues` and `search repos` page through results the same way, so `--limit` above 50 returns up to that many items; filters and the search query apply to every page (#244) +- Linux install guide now points Fedora/RHEL users to the `cbiro/copia-cli` COPR project; `qubernetic/copia-cli` does not exist (#233) ### Changed @@ -129,15 +143,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The integration tests `TestNotificationList_Run` and `TestNotificationList_All` ask for one notification instead of 30: app.copia.io takes about two seconds per notification it returns, so the two took 49 s and 24 s (run 42364994440). `TestStatus` stays the slowest test, since `status` itself asks for 50 notifications per page (#449) (#447) - The integration tests run in a fresh repository instead of the fixed `COPIA_TEST_REPO`, which had collected so many pull requests, issues and notifications that Copia answered slowly (the `Integration tests` step took 22 minutes). The first test of a run creates a private repository `it-run-` with an initial commit in the `COPIA_TEST_OWNER` organization, every test works in it and creates the issues and pull requests it needs, and `TestMain` deletes it after the run and fails the run unless the API then answers 404 for it. Before creating it, a run deletes every `it-run-*` repository of the organization older than two hours, left by a run that hit the timeout. Every delete goes through one helper that refuses, without a request, any name that is not `it-run-` and a lowercase base36 time; its unit tests run with `go test ./...`. The repository name is not printed. The `Integration tests` and `Copia version` steps of `ci.yml` and `integration-scheduled.yml` no longer pass `COPIA_TEST_REPO` (#445) - Every workflow job runs on `ubuntu-24.04` instead of `ubuntu-latest` (14 jobs in `aur.yml`, `bump-go.yml`, `ci.yml`, `close-issues-on-merge.yml`, `codeql.yml`, `copr.yml`, `docs.yml`, `govulncheck.yml`, `integration-scheduled.yml` and `release.yml`), so the runner image changes only with a commit. Dependabot does not track runner labels, so the image is bumped by hand. `test/workflows` fails `go test ./...` on a `runs-on` label ending in `-latest`, in any case, also in a list, a `labels:` mapping or a `strategy.matrix` value, in every workflow and every local action or reusable workflow it reaches (#441) - - The `integration` job of `ci.yml` runs on ready pull requests only, one run at a time per pull request: it skips a draft (`if: github.event_name != 'pull_request' || !github.event.pull_request.draft`), and `pull_request` lists the types `opened`, `synchronize`, `reopened` and `ready_for_review`, so marking a draft ready starts it; the other jobs also run once more then. The job sits in the concurrency group `integration-` and the job of `integration-scheduled.yml` in `integration-`, both with `cancel-in-progress: false`: a newer push waits for the running job instead of cancelling it, since a cancelled run skips its `t.Cleanup` and leaves fixture pull requests and `it-pr-*` branches in the shared test repository (GitHub keeps only the newest waiting run). A draft shows no integration result; a failure appears when the pull request is marked ready. `test/workflows` fails without the draft condition, the `ready_for_review` type or the concurrency group with `cancel-in-progress: false` (#440) - - The `integration` job of `ci.yml` and `integration-scheduled.yml` prints the run time of every integration test: the `Integration tests` step runs the same `go test -tags=integration -timeout 30m ./...` through gotestsum `v1.13.0` (the version of the `test` job) as `gotestsum --format pkgname --hide-summary skipped --jsonfile-timing-events "$RUNNER_TEMP/integration-timing.json" -- ...`, and a `Slowest tests` step, also after a failure or the `-timeout` panic (`if: ${{ !cancelled() }}`), runs `gotestsum tool slowest` on that file, which prints test names and durations only. The file holds the pass, skip and fail events without any test output, and no step uploads or prints it. A passing or skipped test still prints nothing; a failing test prints its output as before, and a test the `-timeout` stops now prints its output too. `test/workflows` fails on `-v` or `-json`, on a gotestsum format that prints passing tests' output (`testname` included, which gotestsum turns into `github-actions` on a runner), on any other gotestsum flag (`--jsonfile` included), on a `GOTESTSUM_` variable, on a step that uploads an artifact or names the file other than these two, and on a `Slowest tests` step without the `!cancelled()` condition (#439) - **Breaking:** `COPIA_TOKEN` is now sent only to the host that `--host` or `COPIA_HOST` names. The token order is `--token`, then `COPIA_TOKEN` when the host came from `--host` or `COPIA_HOST`, then the stored token of the host's active account. When the host comes from the config (`default_host`, or the alphabetically first host), the commands use its stored token and print `warning: COPIA_TOKEN is ignored because no host is named; set COPIA_HOST (or --host) to the host the token belongs to` once on standard error; without a stored token the `no token configured` error carries the same hint. Before, `COPIA_TOKEN` went to whichever host the config named, and `auth logout`, `auth switch`, `auth login` and the alphabetical fallback all move that host, so the token could reach a host it was not issued for. The token value appears in no output or error. If you set only `COPIA_TOKEN` beside a config file, add `COPIA_HOST` (#429) - - `docs/parity.md` follows the Gitea 1.26 API: `issue lock`, `unlock` and `unpin`, `pr update-branch`, `repo sync` (`merge-upstream`), `repo deploy-key` and the Actions groups `workflow`, `run`, `secret` and `variable` are listed as possible, each with its endpoint; the Actions rows note that whether Copia enables Actions is unknown. `issue transfer`, `run cancel`, `search code` and `search commits` stay without an equivalent. The summary is recounted from the rows (69 implementable, 38 implemented). The new integration test `TestAPI_Version` reads `GET /version` and logs the version Copia reports. The `integration` job of `ci.yml` and `integration-scheduled.yml` gets a `Copia version` step that runs only that test with `-v`, so its log shows the version; the `Integration tests` step stays without `-v` (`integration-scheduled.yml` drops the `-v` it had), because a passing test's `t.Logf` would print the test account, its private repositories and notifications in the public log. `test/workflows` rejects `go test -v` in any other step of the job. Copia answers with its own version number (`0.59.0` on 2026-11-04), not a Gitea release (#366) -- `api --field` is now typed like `gh`, and its short form is `-F` (`-f` is `--raw-field`): `true`, `false`, `null` and integers are sent as JSON values, `@file` sends the contents of the file and `@-` reads standard input; anything else stays a string. A script that used `--field n=1` now sends the number `1`; use `--raw-field` or `-f` for the string. Both flags take one `key=value` per use, so a value with a comma, such as `-f title="a, b"`, is no longer split into two values (#167) -- The `--json` field names are the keys the commands print: `user` replaces `author` on `issue view`, `pr list` and `pr view`, and `stars_count` and `forks_count` replace `stars` and `forks` on `repo view`. `html_url` is now listed on `issue view`, `pr view` and `repo view`, and `id` on `release list` and `label list`; these keys were already printed. The `release list` and `repo list` help examples use `tag_name` and `full_name` (#177) +- **Breaking:** `api --field` is now typed like `gh`, and its short form is `-F` (`-f` is `--raw-field`): `true`, `false`, `null` and integers are sent as JSON values, `@file` sends the contents of the file and `@-` reads standard input; anything else stays a string. A script that used `--field n=1` now sends the number `1`; use `--raw-field` or `-f` for the string. Both flags take one `key=value` per use, so a value with a comma, such as `-f title="a, b"`, is no longer split into two values (#167) +- **Breaking:** The `--json` field names are the keys the commands print: `user` replaces `author` on `issue view`, `pr list` and `pr view`, and `stars_count` and `forks_count` replace `stars` and `forks` on `repo view`. `html_url` is now listed on `issue view`, `pr view` and `repo view`, and `id` on `release list` and `label list`; these keys were already printed. The `release list` and `repo list` help examples use `tag_name` and `full_name` (#177) - `.devcontainer/compose.yaml` adds a `dev` service for the Horde sandbox (`horde-dev`): it runs as `1000:100`, keeps the Go caches and `HOME` on named volumes, is limited to 2 GB of memory and ships golangci-lint v2.15.0. bump-go now also updates `.devcontainer/Dockerfile`. The local workflow (`docker-compose*.yml`, `devcontainer.json`, `justfile`) is unchanged (#257) - All workflows except bump-go read the Go version from `go.mod` instead of a hard-coded `1.26` (#228) - bump-go opens its pull requests with a GitHub App token, so CI runs on them; its actions are pinned by commit SHA and its `GITHUB_TOKEN` is read-only. Setup and key rotation are in `docs/ci.md` (#238) @@ -151,13 +162,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The workflow expression check also fails on a `${{` in the `script:` input of an `actions/github-script` step, and scans the steps of composite actions under `.github/actions/*/action.yml` (#270) - Only a repository admin can create a `v*` release tag (new `Release tag creation` ruleset); pushed `v*` tags stay undeletable and immovable for everyone. `docs/releasing.md` and `CONTRIBUTING.md` state the rule (#272) +## [1.1.2] - 2026-04-16 + ### Fixed -- `issue create --label` and `issue edit --add-label` resolve names against the organization labels as well as the repository labels, so org-level labels can be attached; a repository label wins on a name clash. `issue create` now sends label IDs instead of raw names (#216) -- `issue edit --add-label` looks up label names on every page of the repository labels, so labels past the first 50 resolve instead of failing with "not found" (#246) -- `issue list` pages through results, so `--limit` above 50 returns up to that many issues instead of stopping at the first page; `--state` and `--label` apply to every page (#215) -- `pr list`, `repo list` (user and `--org`), `release list`, `search issues` and `search repos` page through results the same way, so `--limit` above 50 returns up to that many items; filters and the search query apply to every page (#244) -- Linux install guide now points Fedora/RHEL users to the `cbiro/copia-cli` COPR project; `qubernetic/copia-cli` does not exist (#233) +- COPR builds the RPM from the pre-built binaries of the GitHub release instead of from source, since Fedora had no Go 1.26. The spec carries both architectures as two sources (`Source0` amd64, `Source1` arm64, chosen with `%ifarch` in `%prep`) and disables the debug package, which failed on the stripped binaries with an empty `debugsourcefiles.list` (#203) +- The snap uses strict confinement with the `network` and `home` plugs instead of classic, which needs a manual Snap Store review, and builds with `CGO_ENABLED=0` from the `go/latest/stable` channel (`go/1.26/stable` does not exist). The Linux install guide notes the limits of strict confinement (#203) +- The WinGet release needs a token with the `workflow` scope to sync the winget-pkgs fork + +## [1.1.1] - 2026-04-16 + +### Fixed + +- COPR writes the release version into the spec file instead of passing it with `--define`, which COPR drops when it rebuilds the SRPM; the spec in the repository holds a placeholder version (#201) +- AUR pushes `PKGBUILD` and a generated `.SRCINFO` over SSH with git instead of a third-party action (#201) ## [1.1.0] - 2026-04-16