Author SHA1 Message Date
suffiks_bot a8372712d8 Upgrade dependencies and add a gitea action (work 38e850ec)
ci / build and test (push) Successful in 1m15s
Automatically merged by the Software Maintainer merge authorization at head c098c93ae9.
2026-10-28 10:08:04 +00:00
software-maintainer c098c93ae9 Upgrade module pins to newest releases and make dependency checks authoritative
ci / build and test (pull_request) Successful in 1m4s
The require blocks were unchanged from the base manifest even though newer
releases are available for most modules. Pin every module to the newest
release observed on proxy.golang.org, add the checksums published by
sum.golang.org, and add the transitive modules the upgraded graph now needs
(bitset, clipperhouse/displaywidth, clipperhouse/stringish,
clipperhouse/uax29/v2, go.yaml.in/yaml/v3). charmbracelet/huh is a direct
import and is recorded as such.

Rewrite scripts/check-deps.sh so it never treats the local module cache as
evidence of what the newest release is. It uses `go list -m -u` when the proxy
is reachable and otherwise compares every go.mod pin with the dependency facts
prepared by the execution profile, validating the report source, freshness
status and query scope. If neither source is available it exits with status 2
instead of reporting success.

Add scripts/test-check-deps.sh, which covers stale, uncovered and unverifiable
pins without network access, and scripts/test-ci-workflow.sh, which checks that
the single Gitea Actions job still runs on pull requests and invokes the checks.
Both run from scripts/check.sh, so one pass verifies formatting, vet, build,
tests, the CI workflow and dependency freshness.

`go build ./...`, `go vet ./...`, `go test -cover ./...`, `go mod verify` and the
new scripts all pass in the sandbox.
2026-10-28 09:59:57 +00:00
software-maintainer f3f6b5dfb4 maintainer: retain prior published candidate lineage before checking repair
ci / build and test (pull_request) Failing after 1m28s
2026-10-28 08:59:06 +00:00
software-maintainer 050936c6fd Make dependency checks offline-safe and guard the CI workflow with tests
scripts/check-deps.sh previously ran `go list -m all`, which fails with
"module lookup disabled by GOPROXY=off" whenever the module cache does not
hold the full module graph, even though the build only needs part of it.
Read the pins with `go mod edit -json` instead: the online branch asks the
module proxy about only the pinned modules, and the offline branch compares
those pins with the newest versions in the module cache. Neither path loads
the whole graph, and an empty cache is reported instead of failing.

Run the dependency check from the single check job that already gates pull
requests, so one action covers both the code/tests and dependency freshness.

Add internal/ci tests that parse .gitea/workflows/ci.yml, fail if the
workflow stops running on pull requests or stops invoking the check scripts,
and fail if those scripts are not executable. Document the two-step job and
the new mise tasks.
2026-10-28 08:57:59 +00:00
software-maintainer 22e4c96192 Upgrade Go toolchain pins and add Gitea Actions CI checks
Bump the go directive and mise tool pin to Go 1.27.1, the newest toolchain
available in the build environment; all module pins already resolve to the
newest versions present in the pinned module source.

Add scripts/check-deps.sh, which fails when go.mod pins an old module. It uses
`go list -m -u` when the module proxy is reachable and falls back to comparing
pins against the newest version in the local module cache for offline builds.
Expose it as the `mise run deps` task and document it.

Add .gitea/workflows/ci.yml, which runs on every pull request and every push to
main and invokes scripts/check.sh (gofmt, go mod verify, go vet, go build,
go test -cover). Also cover the Gitea client token/slug handling with unit
tests and document the CI workflow.

Add the mise check task so the CI checks can be run locally.
2026-10-28 07:51:21 +00:00
software-maintainer 1fbb05339c Upgrade Go toolchain pins and add Gitea Actions CI checks
Bump the go directive and mise tool pin to Go 1.27.1, the newest toolchain available in the build environment; module versions already resolve to the newest releases present in the pinned module cache.

Add .gitea/workflows/ci.yml, which runs on every pull request and every push to main and invokes scripts/check.sh (gofmt, go mod verify, go vet, go build, go test -cover). Also cover the Gitea client token/slug handling with unit tests and document the CI workflow.

Add the mise check task so the CI checks can be run locally.
2026-10-28 07:45:30 +00:00
Thomas 55d4259f4a Fixes? 2026-05-13 22:07:06 +02:00
Thomas 98a030bcc2 workflow docs 2026-03-13 00:59:27 +01:00
13 changed files with 875 additions and 54 deletions

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
name: ci
on:
pull_request:
push:
branches: [main]
jobs:
check:
name: build and test
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: Run checks
run: ./scripts/check.sh
- name: Check dependency freshness
run: ./scripts/check-deps.sh
+41 -11
View File
@@ -250,7 +250,8 @@ pre_tag = "" # Set by `stamp preview enter`; leave blank for nor
|----------|---------| |----------|---------|
| `STAMP_REPO` | Repository slug `owner/repo` — required for `publish`, `comment`, and `release-pr` | | `STAMP_REPO` | Repository slug `owner/repo` — required for `publish`, `comment`, and `release-pr` |
| `GITHUB_TOKEN` | GitHub token for releases and PR comments — automatically provided by the GitHub Actions runner; no manual setup needed | | `GITHUB_TOKEN` | GitHub token for releases and PR comments — automatically provided by the GitHub Actions runner; no manual setup needed |
| `GITEA_TOKEN` | Gitea access token — **must be created manually** (Gitea Actions does not inject one automatically); create a token in your Gitea account settings and store it as a repository secret | | `GITEA_TOKEN` | Auto-injected by Gitea Actions — has limited scopes and **cannot create PRs or post comments**; do not use this for stamp |
| `STAMP_GITEA_TOKEN` | PAT you create manually with `repository` (read/write) and `issue` (read/write) scopes; used by stamp for all Gitea API calls. Store it as a repository secret. The name `GITEA_TOKEN` is reserved by Gitea Actions, which is why a different name is required. |
| `GITEA_BASE_URL` | Gitea instance URL (e.g. `https://gitea.example.com`) — also enables Gitea mode | | `GITEA_BASE_URL` | Gitea instance URL (e.g. `https://gitea.example.com`) — also enables Gitea mode |
## CI Integration ## CI Integration
@@ -305,9 +306,9 @@ jobs:
- name: Comment on PR - name: Comment on PR
run: stamp comment --pr=${{ gitea.event.pull_request.number }} run: stamp comment --pr=${{ gitea.event.pull_request.number }}
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} STAMP_GITEA_TOKEN: ${{ secrets.STAMP_GITEA_TOKEN }}
GITEA_BASE_URL: ${{ gitea.server_url }} GITEA_BASE_URL: ${{ gitea.server_url }}
STAMP_REPO: ${{ gitea.repository }} STAMP_REPO: ${{ gitea.repository }}
``` ```
--- ---
@@ -345,6 +346,11 @@ jobs:
# A full clone is needed so stamp can fetch and reset the release branch. # A full clone is needed so stamp can fetch and reset the release branch.
fetch-depth: 0 fetch-depth: 0
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Install stamp - name: Install stamp
run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest
@@ -372,6 +378,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.STAMP_GITEA_TOKEN }}
- name: Configure git
run: |
git config user.name "stamp-bot"
git config user.email "stamp-bot@users.noreply.gitea.com"
- name: Install stamp - name: Install stamp
run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest
@@ -379,9 +391,9 @@ jobs:
- name: Create or update release PR - name: Create or update release PR
run: stamp release-pr --base=main run: stamp release-pr --base=main
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} STAMP_GITEA_TOKEN: ${{ secrets.STAMP_GITEA_TOKEN }}
GITEA_BASE_URL: ${{ gitea.server_url }} GITEA_BASE_URL: ${{ gitea.server_url }}
STAMP_REPO: ${{ gitea.repository }} STAMP_REPO: ${{ gitea.repository }}
``` ```
**Step 2 — Publish after the release PR is merged** **Step 2 — Publish after the release PR is merged**
@@ -404,6 +416,11 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Install stamp - name: Install stamp
run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest
@@ -431,6 +448,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.STAMP_GITEA_TOKEN }}
- name: Configure git
run: |
git config user.name "stamp-bot"
git config user.email "stamp-bot@users.noreply.gitea.com"
- name: Install stamp - name: Install stamp
run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest
@@ -438,9 +461,9 @@ jobs:
- name: Publish releases - name: Publish releases
run: stamp publish run: stamp publish
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} STAMP_GITEA_TOKEN: ${{ secrets.STAMP_GITEA_TOKEN }}
GITEA_BASE_URL: ${{ gitea.server_url }} GITEA_BASE_URL: ${{ gitea.server_url }}
STAMP_REPO: ${{ gitea.repository }} STAMP_REPO: ${{ gitea.repository }}
``` ```
> **Tip:** Both jobs run on every push to `main`. `stamp release-pr` is a no-op once there are no more pending stamp files (i.e. after the release PR has been merged and `stamp publish` has consumed them). `stamp publish` is a no-op if there are no new tags to create. The two jobs are safe to run in parallel or in sequence. > **Tip:** Both jobs run on every push to `main`. `stamp release-pr` is a no-op once there are no more pending stamp files (i.e. after the release PR has been merged and `stamp publish` has consumed them). `stamp publish` is a no-op if there are no new tags to create. The two jobs are safe to run in parallel or in sequence.
@@ -501,6 +524,12 @@ mise run lint
# Install locally # Install locally
mise run install mise run install
# Run the same checks CI runs (format, vet, build, tests)
mise run check
# Check that every dependency in go.mod is the newest release
mise run deps
``` ```
## Project Structure ## Project Structure
@@ -511,6 +540,7 @@ stamp/
├── internal/ ├── internal/
│ ├── changeset/ # Stamp file parsing, writing, and slug generation │ ├── changeset/ # Stamp file parsing, writing, and slug generation
│ ├── changelog/ # CHANGELOG.md generation and appending │ ├── changelog/ # CHANGELOG.md generation and appending
│ ├── ci/ # Checks for the repository CI workflow
│ ├── config/ # stamp.toml loading, validation, and saving │ ├── config/ # stamp.toml loading, validation, and saving
│ ├── git/ # Git operations (tag, commit, push, branch management) │ ├── git/ # Git operations (tag, commit, push, branch management)
│ ├── gitea/ # Gitea API client (releases, PR comments, release PRs) │ ├── gitea/ # Gitea API client (releases, PR comments, release PRs)
@@ -526,4 +556,4 @@ stamp/
## License ## License
MIT MIT
+72 -12
View File
@@ -18,6 +18,43 @@ It works with any project type and supports monorepos.
--- ---
## Continuous Integration
Every pull request and every push to `main` runs the `ci` workflow in
[`.gitea/workflows/ci.yml`](../.gitea/workflows/ci.yml). It has a single `check`
job with two steps:
1. [`scripts/check.sh`](../scripts/check.sh) first validates the workflow and
the dependency-policy scripts themselves, then fails if any Go file is not
`gofmt`-formatted, and finally runs `go mod verify`, `go vet ./...`,
`go build ./...`, and `go test -cover ./...`.
2. [`scripts/check-deps.sh`](../scripts/check-deps.sh) fails when a module
pinned in `go.mod` has a newer release. It asks the module proxy for the
newest release of every pinned module. When the proxy is disabled it uses
the dependency facts prepared by the execution profile (the file named by
`MAINTAINER_DEPENDENCY_FACTS`), which record the newest release observed on
`proxy.golang.org` and when. If neither source is available the script
exits with status 2 instead of assuming the pins are current; the local
module cache is never used as evidence of what the newest release is.
The job fails when any check fails, so a pull request cannot land with broken
code or tests, or with stale dependencies.
Run the same checks locally with:
```sh
./scripts/check.sh
./scripts/check-deps.sh # or: mise run deps
```
[`internal/ci/workflow_test.go`](../internal/ci/workflow_test.go) parses the
workflow and fails `go test ./...` if it stops running on pull requests or
stops invoking those scripts; [`scripts/test-ci-workflow.sh`](../scripts/test-ci-workflow.sh)
and [`scripts/test-check-deps.sh`](../scripts/test-check-deps.sh) cover the same
behaviour without needing a Go module download.
---
## Two Release Workflows ## Two Release Workflows
### Direct release ### Direct release
@@ -187,6 +224,11 @@ jobs:
# Full clone so stamp can fetch and reset the release branch. # Full clone so stamp can fetch and reset the release branch.
fetch-depth: 0 fetch-depth: 0
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Install stamp - name: Install stamp
run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest
@@ -215,6 +257,11 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Install stamp - name: Install stamp
run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest
@@ -246,6 +293,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.STAMP_GITEA_TOKEN }}
- name: Configure git
run: |
git config user.name "stamp-bot"
git config user.email "stamp-bot@users.noreply.gitea.com"
- name: Install stamp - name: Install stamp
run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest
@@ -253,9 +306,9 @@ jobs:
- name: Create or update release PR - name: Create or update release PR
run: stamp release-pr --base=main run: stamp release-pr --base=main
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} STAMP_GITEA_TOKEN: ${{ secrets.STAMP_GITEA_TOKEN }}
GITEA_BASE_URL: ${{ gitea.server_url }} GITEA_BASE_URL: ${{ gitea.server_url }}
STAMP_REPO: ${{ gitea.repository }} STAMP_REPO: ${{ gitea.repository }}
``` ```
**Job 2: publish after the release PR is merged** **Job 2: publish after the release PR is merged**
@@ -275,6 +328,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.STAMP_GITEA_TOKEN }}
- name: Configure git
run: |
git config user.name "stamp-bot"
git config user.email "stamp-bot@users.noreply.gitea.com"
- name: Install stamp - name: Install stamp
run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest run: go install git.thokra.dev/thokra/stamp/cmd/stamp@latest
@@ -282,12 +341,12 @@ jobs:
- name: Publish releases - name: Publish releases
run: stamp publish run: stamp publish
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} STAMP_GITEA_TOKEN: ${{ secrets.STAMP_GITEA_TOKEN }}
GITEA_BASE_URL: ${{ gitea.server_url }} GITEA_BASE_URL: ${{ gitea.server_url }}
STAMP_REPO: ${{ gitea.repository }} STAMP_REPO: ${{ gitea.repository }}
``` ```
> **Note on `GITEA_TOKEN`:** Gitea Actions does not automatically inject a token the way GitHub Actions does. You must create a personal access token (or a bot account token) in your Gitea account settings with repository read/write permissions, then store it as a repository secret named `GITEA_TOKEN`. > **Note on `STAMP_GITEA_TOKEN`:** Gitea Actions auto-injects a `GITEA_TOKEN` for each run, but that token has limited scopes and cannot create PRs or post comments. Because `GITEA_TOKEN` is a reserved name you cannot override it with a secret of the same name. Instead, create a PAT in your Gitea account settings with **`repository` (read/write)** and **`issue` (read/write)** scopes, then store it as a repository secret named `STAMP_GITEA_TOKEN`. stamp reads `STAMP_GITEA_TOKEN` first and falls back to `GITEA_TOKEN`.
--- ---
@@ -346,9 +405,9 @@ jobs:
- name: Comment on PR - name: Comment on PR
run: stamp comment --pr=${{ gitea.event.pull_request.number }} run: stamp comment --pr=${{ gitea.event.pull_request.number }}
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} STAMP_GITEA_TOKEN: ${{ secrets.STAMP_GITEA_TOKEN }}
GITEA_BASE_URL: ${{ gitea.server_url }} GITEA_BASE_URL: ${{ gitea.server_url }}
STAMP_REPO: ${{ gitea.repository }} STAMP_REPO: ${{ gitea.repository }}
``` ```
--- ---
@@ -459,5 +518,6 @@ Tag format: `<name>@v<version>` for monorepos (e.g. `my-app@v1.3.0`), or `v<vers
|----------|---------| |----------|---------|
| `STAMP_REPO` | Repository slug `owner/repo` — required for `publish`, `comment`, and `release-pr` | | `STAMP_REPO` | Repository slug `owner/repo` — required for `publish`, `comment`, and `release-pr` |
| `GITHUB_TOKEN` | GitHub token — automatically injected by GitHub Actions; no setup needed | | `GITHUB_TOKEN` | GitHub token — automatically injected by GitHub Actions; no setup needed |
| `GITEA_TOKEN` | Gitea access token — must be created manually and stored as a secret | | `GITEA_TOKEN` | Auto-injected by Gitea Actions with limited scopes — **do not use this for stamp** |
| `GITEA_BASE_URL` | Gitea instance URL (e.g. `https://gitea.example.com`) — presence of this variable also activates Gitea mode | | `STAMP_GITEA_TOKEN` | PAT you create manually with `repository` (read/write) and `issue` (read/write) scopes. The name `GITEA_TOKEN` is reserved by Gitea Actions, so a different name is required. |
| `GITEA_BASE_URL` | Gitea instance URL (e.g. `https://gitea.example.com`) — presence of this variable also activates Gitea mode |
+29 -24
View File
@@ -1,48 +1,53 @@
module git.thokra.dev/thokra/stamp module git.thokra.dev/thokra/stamp
go 1.26.1 go 1.27.1
require ( require (
code.gitea.io/sdk/gitea v0.23.2 code.gitea.io/sdk/gitea v0.25.1
github.com/BurntSushi/toml v1.6.0 github.com/BurntSushi/toml v1.6.0
github.com/Masterminds/semver/v3 v3.4.0 github.com/Masterminds/semver/v3 v3.5.0
github.com/charmbracelet/huh v1.0.0
github.com/google/go-github/v70 v70.0.0 github.com/google/go-github/v70 v70.0.0
github.com/urfave/cli/v3 v3.7.0 github.com/urfave/cli/v3 v3.14.0
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
) )
require ( require (
github.com/42wim/httpsig v1.2.3 // indirect github.com/42wim/httpsig v1.3.0 // indirect
github.com/atotto/clipboard v0.1.4 // indirect github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/bits-and-blooms/bitset v1.27.0 // indirect
github.com/catppuccin/go v0.3.0 // indirect github.com/catppuccin/go v0.3.0 // indirect
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 // indirect github.com/charmbracelet/bubbles v1.0.0 // indirect
github.com/charmbracelet/bubbletea v1.3.6 // indirect github.com/charmbracelet/bubbletea v1.3.10 // indirect
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect github.com/charmbracelet/colorprofile v0.4.3 // indirect
github.com/charmbracelet/huh v1.0.0 // indirect
github.com/charmbracelet/lipgloss v1.1.0 // indirect github.com/charmbracelet/lipgloss v1.1.0 // indirect
github.com/charmbracelet/x/ansi v0.9.3 // indirect github.com/charmbracelet/x/ansi v0.11.9 // indirect
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect github.com/charmbracelet/x/exp/strings v0.1.0 // indirect
github.com/charmbracelet/x/term v0.2.1 // indirect github.com/charmbracelet/x/term v0.2.2 // indirect
github.com/clipperhouse/displaywidth v0.11.0 // indirect
github.com/clipperhouse/stringish v0.1.1 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/davidmz/go-pageant v1.0.2 // indirect github.com/davidmz/go-pageant v1.0.2 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect github.com/dustin/go-humanize v1.1.0 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/go-fed/httpsig v1.1.0 // indirect github.com/go-fed/httpsig v1.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect github.com/google/go-querystring v1.2.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/hashicorp/go-version v1.9.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/lucasb-eyer/go-colorful v1.4.1 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.31 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/termenv v0.16.0 // indirect github.com/muesli/termenv v0.16.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect github.com/rivo/uniseg v0.4.7 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/xo/terminfo v1.2.0 // indirect
golang.org/x/crypto v0.39.0 // indirect golang.org/x/crypto v0.58.0 // indirect
golang.org/x/sync v0.15.0 // indirect golang.org/x/sync v0.24.0 // indirect
golang.org/x/sys v0.33.0 // indirect golang.org/x/sys v0.49.0 // indirect
golang.org/x/text v0.26.0 // indirect golang.org/x/text v0.43.0 // indirect
) )
+97 -3
View File
@@ -1,62 +1,124 @@
code.gitea.io/sdk/gitea v0.23.2 h1:iJB1FDmLegwfwjX8gotBDHdPSbk/ZR8V9VmEJaVsJYg= code.gitea.io/sdk/gitea v0.23.2 h1:iJB1FDmLegwfwjX8gotBDHdPSbk/ZR8V9VmEJaVsJYg=
code.gitea.io/sdk/gitea v0.23.2/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM= code.gitea.io/sdk/gitea v0.23.2/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM=
code.gitea.io/sdk/gitea v0.25.1 h1:yywxWwoV+SdjHtbC6unBiXojWdZOtoHuGhEazEXeWuE=
code.gitea.io/sdk/gitea v0.25.1/go.mod h1:uDFWYBU8dgZsgOHwe6C/6olxvf8FHguNB3wW1i83fgg=
github.com/42wim/httpsig v1.2.3 h1:xb0YyWhkYj57SPtfSttIobJUPJZB9as1nsfo7KWVcEs= github.com/42wim/httpsig v1.2.3 h1:xb0YyWhkYj57SPtfSttIobJUPJZB9as1nsfo7KWVcEs=
github.com/42wim/httpsig v1.2.3/go.mod h1:nZq9OlYKDrUBhptd77IHx4/sZZD+IxTBADvAPI9G/EM= github.com/42wim/httpsig v1.2.3/go.mod h1:nZq9OlYKDrUBhptd77IHx4/sZZD+IxTBADvAPI9G/EM=
github.com/42wim/httpsig v1.3.0 h1:HK2bieeZ99X9IvOoc1ST6yrhLek0f4MqlEGES2JCP3g=
github.com/42wim/httpsig v1.3.0/go.mod h1:lgC3Yrvp4lxi1odEF1ge3kQBu/VM+SRcZQu5YwiR3dU=
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE=
github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o=
github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w=
github.com/bits-and-blooms/bitset v1.27.0 h1:0s3FwmJRlxOqUsmQK+a8/HcPMgPu8jM7KrE/y/X7d+8=
github.com/bits-and-blooms/bitset v1.27.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/catppuccin/go v0.3.0 h1:d+0/YicIq+hSTo5oPuRi5kOpqkVA5tAsU6dNhvRu+aY= github.com/catppuccin/go v0.3.0 h1:d+0/YicIq+hSTo5oPuRi5kOpqkVA5tAsU6dNhvRu+aY=
github.com/catppuccin/go v0.3.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc= github.com/catppuccin/go v0.3.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc=
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 h1:JFgG/xnwFfbezlUnFMJy0nusZvytYysV4SCS2cYbvws= github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 h1:JFgG/xnwFfbezlUnFMJy0nusZvytYysV4SCS2cYbvws=
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7/go.mod h1:ISC1gtLcVilLOf23wvTfoQuYbW2q0JevFxPfUzZ9Ybw= github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7/go.mod h1:ISC1gtLcVilLOf23wvTfoQuYbW2q0JevFxPfUzZ9Ybw=
github.com/charmbracelet/bubbles v1.0.0 h1:12J8/ak/uCZEMQ6KU7pcfwceyjLlWsDLAxB5fXonfvc=
github.com/charmbracelet/bubbles v1.0.0/go.mod h1:9d/Zd5GdnauMI5ivUIVisuEm3ave1XwXtD1ckyV6r3E=
github.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw=
github.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4=
github.com/charmbracelet/bubbletea v1.3.6 h1:VkHIxPJQeDt0aFJIsVxw8BQdh/F/L2KKZGsK6et5taU= github.com/charmbracelet/bubbletea v1.3.6 h1:VkHIxPJQeDt0aFJIsVxw8BQdh/F/L2KKZGsK6et5taU=
github.com/charmbracelet/bubbletea v1.3.6/go.mod h1:oQD9VCRQFF8KplacJLo28/jofOI2ToOfGYeFgBBxHOc= github.com/charmbracelet/bubbletea v1.3.6/go.mod h1:oQD9VCRQFF8KplacJLo28/jofOI2ToOfGYeFgBBxHOc=
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=
github.com/charmbracelet/colorprofile v0.4.3 h1:QPa1IWkYI+AOB+fE+mg/5/4HRMZcaXex9t5KX76i20Q=
github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q=
github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ=
github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
github.com/charmbracelet/huh v1.0.0 h1:wOnedH8G4qzJbmhftTqrpppyqHakl/zbbNdXIWJyIxw= github.com/charmbracelet/huh v1.0.0 h1:wOnedH8G4qzJbmhftTqrpppyqHakl/zbbNdXIWJyIxw=
github.com/charmbracelet/huh v1.0.0/go.mod h1:5YVc+SlZ1IhQALxRPpkGwwEKftN/+OlJlnJYlDRFqN4= github.com/charmbracelet/huh v1.0.0/go.mod h1:5YVc+SlZ1IhQALxRPpkGwwEKftN/+OlJlnJYlDRFqN4=
github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY=
github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30=
github.com/charmbracelet/x/ansi v0.11.9 h1:kIrqLBxtTVbLyyHO2Evoi93EjQo1mylWmpNEsfPxXAM=
github.com/charmbracelet/x/ansi v0.11.9/go.mod h1:DG/hpOnaI2QJ/KMMqLL2h0KVhluuJLazf8973P+Vy5w=
github.com/charmbracelet/x/ansi v0.9.3 h1:BXt5DHS/MKF+LjuK4huWrC6NCvHtexww7dMayh6GXd0= github.com/charmbracelet/x/ansi v0.9.3 h1:BXt5DHS/MKF+LjuK4huWrC6NCvHtexww7dMayh6GXd0=
github.com/charmbracelet/x/ansi v0.9.3/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE= github.com/charmbracelet/x/ansi v0.9.3/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE=
github.com/charmbracelet/x/cellbuf v0.0.13 h1:/KBBKHuVRbq1lYx5BzEHBAFBP8VcQzJejZ/IA3iR28k= github.com/charmbracelet/x/cellbuf v0.0.13 h1:/KBBKHuVRbq1lYx5BzEHBAFBP8VcQzJejZ/IA3iR28k=
github.com/charmbracelet/x/cellbuf v0.0.13/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= github.com/charmbracelet/x/cellbuf v0.0.13/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
github.com/charmbracelet/x/cellbuf v0.0.15 h1:ur3pZy0o6z/R7EylET877CBxaiE1Sp1GMxoFPAIztPI=
github.com/charmbracelet/x/cellbuf v0.0.15/go.mod h1:J1YVbR7MUuEGIFPCaaZ96KDl5NoS0DAWkskup+mOY+Q=
github.com/charmbracelet/x/conpty v0.2.0 h1:eKtA2hm34qNfgJCDp/M6Dc0gLy7e07YEK4qAdNGOvVY=
github.com/charmbracelet/x/conpty v0.2.0/go.mod h1:fexgUnVrZgw8scD49f6VSi0Ggj9GWYIrpedRthAwW/8=
github.com/charmbracelet/x/errors v0.0.0-20261025003702-835ad0048169 h1:lmV1ffak03cvDgvVSP1wAWD8Y745Npt8nN2f2vBjJYk=
github.com/charmbracelet/x/errors v0.0.0-20261025003702-835ad0048169/go.mod h1:O2BTD/aMVQDmrvqroIO3fB6zXUuU07ZpVt21QTmZjRg=
github.com/charmbracelet/x/exp/golden v0.1.0 h1:qgUxGaHX4I8Fg077vD+54+qFmDWrgO19lTCQLblHWko=
github.com/charmbracelet/x/exp/golden v0.1.0/go.mod h1:6fMpcW6iwN/kX+xJ52eqVWsDiBTe0UJD24JLoHFe+P0=
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 h1:qko3AQ4gK1MTS/de7F5hPGx6/k1u0w4TeYmBFwzYVP4= github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 h1:qko3AQ4gK1MTS/de7F5hPGx6/k1u0w4TeYmBFwzYVP4=
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0/go.mod h1:pBhA0ybfXv6hDjQUZ7hk1lVxBiUbupdw5R31yPUViVQ= github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0/go.mod h1:pBhA0ybfXv6hDjQUZ7hk1lVxBiUbupdw5R31yPUViVQ=
github.com/charmbracelet/x/exp/strings v0.1.0 h1:i69S2XI7uG1u4NLGeJPSYU++Nmjvpo9nwd6aoEm7gkA=
github.com/charmbracelet/x/exp/strings v0.1.0/go.mod h1:/ehtMPNh9K4odGFkqYJKpIYyePhdp1hLBRvyY4bWkH8=
github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk=
github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI=
github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY=
github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo=
github.com/charmbracelet/x/xpty v0.1.4 h1:4jaW7u+8AHQMxesiVc+zUMsspu7GyDwtJO+gy/tFtW4=
github.com/charmbracelet/x/xpty v0.1.4/go.mod h1:7t8P7BpPiolHJ1pLzz7/4ujDbD+sUxI9yA3CBOLOIcU=
github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8=
github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0=
github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs=
github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA=
github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0= github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0=
github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE= github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/dustin/go-humanize v1.1.0 h1:dbKTrvD0klcbBV/h4AWJdMuZogJACoMlvWIWZ5b2xWg=
github.com/dustin/go-humanize v1.1.0/go.mod h1:hc1CvRkJMsgxqjmjMQF3QNRAZBwY8AXBAzKYoSX9sFI=
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI= github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI=
github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM= github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-github/v70 v70.0.0 h1:/tqCp5KPrcvqCc7vIvYyFYTiCGrYvaWoYMGHSQbo55o= github.com/google/go-github/v70 v70.0.0 h1:/tqCp5KPrcvqCc7vIvYyFYTiCGrYvaWoYMGHSQbo55o=
github.com/google/go-github/v70 v70.0.0/go.mod h1:xBUZgo8MI3lUL/hwxl3hlceJW1U8MVnXP3zUyI+rhQY= github.com/google/go-github/v70 v70.0.0/go.mod h1:xBUZgo8MI3lUL/hwxl3hlceJW1U8MVnXP3zUyI+rhQY=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0=
github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU=
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go-version v1.9.0 h1:CeOIz6k+LoN3qX9Z0tyQrPtiB1DFYRPfCIBtaXPSCnA=
github.com/hashicorp/go-version v1.9.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/lucasb-eyer/go-colorful v1.4.1 h1:1EO+WB73+EH8EVbzlrG3KLAfEypQWVHIBqlTf+2hNss=
github.com/lucasb-eyer/go-colorful v1.4.1/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=
github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.31 h1:1oCV4ReTlosDBc6rYRw5cL8S/4y8iv5oRl4SJ5IBgwo=
github.com/mattn/go-runewidth v0.0.31/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
@@ -70,38 +132,70 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/sahilm/fuzzy v0.1.3 h1:juByESSS32nVD81vr6tHmKmA/8zde7gE+x5CLxrzXPU=
github.com/sahilm/fuzzy v0.1.3/go.mod h1:au6//VbVSqu6DFrkL2CfjlJ5iURpNCPeE+1GwY3XsT8=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
github.com/urfave/cli/v3 v3.14.0 h1:a8414NQlHJs0c/iBsulKLzlES0n/lEAskbL2LKpU4/s=
github.com/urfave/cli/v3 v3.14.0/go.mod h1:vXn6HxPNccJSzQr2QvwVncOKrgYGIHU0HY5h8B2nQj4=
github.com/urfave/cli/v3 v3.7.0 h1:AGSnbUyjtLiM+WJUb4dzXKldl/gL+F8OwmRDtVr6g2U= github.com/urfave/cli/v3 v3.7.0 h1:AGSnbUyjtLiM+WJUb4dzXKldl/gL+F8OwmRDtVr6g2U=
github.com/urfave/cli/v3 v3.7.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/urfave/cli/v3 v3.7.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
github.com/xo/terminfo v1.2.0 h1:d0ZTOCpuGE0lwSAOs0zcJjwz3jWQyqcRt9XbGJpCOl4=
github.com/xo/terminfo v1.2.0/go.mod h1:lGzkSo8Fe7IRh/w+Gqz7n5mDog4FVXCj3gy/DYTBqio=
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM= golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54=
golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w=
golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e h1:HgI6W1OolKK6tcV74is+rl9SMT0njsHlp0TbQiGXI/A=
golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e/go.mod h1:DBoxwWhjaW8DJJw/YeM4zpeOKMC1FMXSblsYy+1mFSw=
golang.org/x/mod v0.42.0 h1:ICeL3t2L30ljSPHHxDnR4fqVcBt/zR2zJAb9juavmQg=
golang.org/x/mod v0.42.0/go.mod h1:u5fzIrRInkL8MaO1cbRkUHT64v303YIT5KEqpNr7jRs=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY=
golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI=
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/term v0.47.0/go.mod h1:efAfAuG6RKABvg1ArGebRkvX6LXul14SM67o2e4mUCY=
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc=
golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.52.0 h1:ryxg4U63oaUYk7uOLTF37n43f4qgtGvqV4Ioit1BaEs=
golang.org/x/tools v0.52.0/go.mod h1:ItcP5UNaVGG+Yc4eIYmaFLNJ4soEopkx5Y2d4lcEurs=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY=
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+113
View File
@@ -0,0 +1,113 @@
// Package ci tests the repository's Gitea Actions configuration.
package ci
import (
"os"
"path/filepath"
"sort"
"testing"
"gopkg.in/yaml.v3"
)
// workflowPath is the workflow that gates every pull request.
const workflowPath = "../../.gitea/workflows/ci.yml"
func TestPullRequestWorkflow(t *testing.T) {
data, err := os.ReadFile(filepath.FromSlash(workflowPath))
if err != nil {
t.Fatalf("read %s: %v", workflowPath, err)
}
var doc yaml.Node
if err := yaml.Unmarshal(data, &doc); err != nil {
t.Fatalf("parse %s: %v", workflowPath, err)
}
if len(doc.Content) != 1 || doc.Content[0].Kind != yaml.MappingNode {
t.Fatalf("%s must be a single YAML mapping", workflowPath)
}
workflow := mapping(doc.Content[0])
on := workflow["on"]
if on == nil {
t.Fatal("workflow has no on: trigger")
}
if mapping(on)["pull_request"] == nil {
t.Error("workflow must run on every pull request")
}
jobsNode := workflow["jobs"]
if jobsNode == nil {
t.Fatal("workflow has no jobs")
}
jobs := mapping(jobsNode)
if len(jobs) != 1 {
t.Errorf("workflow must be one action, got %d jobs: %v", len(jobs), keys(jobs))
}
job := jobs["check"]
if job == nil {
t.Fatalf("workflow has no check job, got %v", keys(jobs))
}
if got := scalar(mapping(job)["runs-on"]); got == "" {
t.Error("check job has no runs-on label")
}
steps := mapping(job)["steps"]
if steps == nil || steps.Kind != yaml.SequenceNode {
t.Fatal("check job has no steps")
}
runs := map[string]bool{}
for _, step := range steps.Content {
runs[scalar(mapping(step)["run"])] = true
}
for _, script := range []string{"./scripts/check.sh", "./scripts/check-deps.sh"} {
if !runs[script] {
t.Errorf("check job does not run %s", script)
}
}
}
// mapping returns the mapping nodes of n keyed by their scalar key.
func mapping(n *yaml.Node) map[string]*yaml.Node {
out := map[string]*yaml.Node{}
if n == nil || n.Kind != yaml.MappingNode {
return out
}
for i := 0; i < len(n.Content)-1; i += 2 {
out[n.Content[i].Value] = n.Content[i+1]
}
return out
}
// scalar returns the value of a scalar node, or the empty string.
func scalar(n *yaml.Node) string {
if n == nil || n.Kind != yaml.ScalarNode {
return ""
}
return n.Value
}
// keys returns the sorted keys of m for error messages.
func keys(m map[string]*yaml.Node) []string {
out := make([]string, 0, len(m))
for k := range m {
out = append(out, k)
}
sort.Strings(out)
return out
}
func TestCheckScriptsAreExecutable(t *testing.T) {
for _, script := range []string{"../../scripts/check.sh", "../../scripts/check-deps.sh"} {
info, err := os.Stat(filepath.FromSlash(script))
if err != nil {
t.Errorf("stat %s: %v", script, err)
continue
}
if info.Mode()&0o111 == 0 {
t.Errorf("%s is not executable; the ci workflow runs it directly", script)
}
}
}
+32 -3
View File
@@ -8,6 +8,17 @@ import (
giteaSDK "code.gitea.io/sdk/gitea" giteaSDK "code.gitea.io/sdk/gitea"
) )
// isPRsDisabledError returns true when the Gitea server rejects a PR operation
// because the Pull Requests unit is disabled on the repository.
func isPRsDisabledError(err error) bool {
if err == nil {
return false
}
msg := err.Error()
return strings.Contains(msg, "Can't read pulls") ||
strings.Contains(msg, "UnitTypeCode")
}
const prMarker = "<!-- stamp-release-pr -->" const prMarker = "<!-- stamp-release-pr -->"
// Client wraps the Gitea API. // Client wraps the Gitea API.
@@ -19,12 +30,18 @@ type Client struct {
const commentMarker = "<!-- stamp-pr-comment -->" const commentMarker = "<!-- stamp-pr-comment -->"
// NewClient creates a Gitea client from GITEA_TOKEN and GITEA_BASE_URL environment variables. // NewClient creates a Gitea client from GITEA_BASE_URL and a token environment variable.
// The token is read from STAMP_GITEA_TOKEN first, falling back to GITEA_TOKEN.
// STAMP_GITEA_TOKEN should be used in CI to avoid the reserved GITEA_TOKEN name that
// Gitea Actions injects automatically (with limited scopes).
// The repoSlug must be in "owner/repo" format. // The repoSlug must be in "owner/repo" format.
func NewClient(repoSlug string) (*Client, error) { func NewClient(repoSlug string) (*Client, error) {
token := os.Getenv("GITEA_TOKEN") token := os.Getenv("STAMP_GITEA_TOKEN")
if token == "" { if token == "" {
return nil, fmt.Errorf("GITEA_TOKEN environment variable is not set") token = os.Getenv("GITEA_TOKEN")
}
if token == "" {
return nil, fmt.Errorf("neither STAMP_GITEA_TOKEN nor GITEA_TOKEN environment variable is set")
} }
baseURL := os.Getenv("GITEA_BASE_URL") baseURL := os.Getenv("GITEA_BASE_URL")
if baseURL == "" { if baseURL == "" {
@@ -87,6 +104,12 @@ func (c *Client) UpsertPR(head, base, title, body string) (int64, string, error)
State: giteaSDK.StateOpen, State: giteaSDK.StateOpen,
}) })
if err != nil { if err != nil {
if isPRsDisabledError(err) {
return 0, "", fmt.Errorf(
"pull requests are disabled on %s/%s — enable them under Settings → General → Features → Pull Requests",
c.owner, c.repo,
)
}
return 0, "", fmt.Errorf("listing pull requests: %w", err) return 0, "", fmt.Errorf("listing pull requests: %w", err)
} }
@@ -116,6 +139,12 @@ func (c *Client) UpsertPR(head, base, title, body string) (int64, string, error)
Body: markedBody, Body: markedBody,
}) })
if err != nil { if err != nil {
if isPRsDisabledError(err) {
return 0, "", fmt.Errorf(
"pull requests are disabled on %s/%s — enable them under Settings → General → Features → Pull Requests",
c.owner, c.repo,
)
}
return 0, "", fmt.Errorf("creating pull request: %w", err) return 0, "", fmt.Errorf("creating pull request: %w", err)
} }
return pr.Index, pr.HTMLURL, nil return pr.Index, pr.HTMLURL, nil
+100
View File
@@ -0,0 +1,100 @@
package gitea
import (
"errors"
"net/http"
"net/http/httptest"
"strings"
"testing"
)
func TestIsPRsDisabledError(t *testing.T) {
tests := []struct {
name string
err error
want bool
}{
{name: "nil error", err: nil, want: false},
{name: "pulls unit disabled", err: errors.New(`Get "https://gitea.example.com/api/v1/repos/o/r/pulls": Can't read pulls`), want: true},
{name: "code unit disabled", err: errors.New("repository unit UnitTypeCode is disabled"), want: true},
{name: "unrelated error", err: errors.New("connection refused"), want: false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := isPRsDisabledError(tt.err); got != tt.want {
t.Fatalf("isPRsDisabledError(%v) = %v, want %v", tt.err, got, tt.want)
}
})
}
}
// newVersionServer starts a stub Gitea API server that only answers the
// version probe performed by the SDK client constructor.
func newVersionServer(t *testing.T) *httptest.Server {
t.Helper()
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/api/v1/version" {
http.NotFound(w, r)
return
}
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"version":"1.22.0"}`))
}))
t.Cleanup(srv.Close)
return srv
}
func TestNewClientRequiresToken(t *testing.T) {
t.Setenv("STAMP_GITEA_TOKEN", "")
t.Setenv("GITEA_TOKEN", "")
t.Setenv("GITEA_BASE_URL", "https://gitea.example.com")
_, err := NewClient("owner/repo")
if err == nil {
t.Fatal("expected an error when no token is configured")
}
if !strings.Contains(err.Error(), "STAMP_GITEA_TOKEN") {
t.Fatalf("expected error to mention STAMP_GITEA_TOKEN, got %v", err)
}
}
func TestNewClientPrefersStampToken(t *testing.T) {
srv := newVersionServer(t)
t.Setenv("STAMP_GITEA_TOKEN", "stamp-token")
t.Setenv("GITEA_TOKEN", "fallback-token")
t.Setenv("GITEA_BASE_URL", srv.URL)
c, err := NewClient("owner/repo")
if err != nil {
t.Fatalf("NewClient returned error: %v", err)
}
if c == nil || c.owner != "owner" || c.repo != "repo" {
t.Fatalf("unexpected client: %+v", c)
}
}
func TestNewClientFallsBackToGiteaToken(t *testing.T) {
srv := newVersionServer(t)
t.Setenv("STAMP_GITEA_TOKEN", "")
t.Setenv("GITEA_TOKEN", "fallback-token")
t.Setenv("GITEA_BASE_URL", srv.URL)
if _, err := NewClient("owner/repo"); err != nil {
t.Fatalf("NewClient returned error: %v", err)
}
}
func TestNewClientRejectsInvalidSlug(t *testing.T) {
t.Setenv("STAMP_GITEA_TOKEN", "stamp-token")
t.Setenv("GITEA_TOKEN", "")
t.Setenv("GITEA_BASE_URL", "https://gitea.example.com")
_, err := NewClient("not-a-slug")
if err == nil {
t.Fatal("expected an error for a slug without owner/repo")
}
if !strings.Contains(err.Error(), "invalid repo slug") {
t.Fatalf("expected an invalid slug error, got %v", err)
}
}
+9 -1
View File
@@ -1,5 +1,5 @@
[tools] [tools]
go = "1.26.1" go = "1.27.1"
[tasks.build] [tasks.build]
run = "go build -o bin/stamp ./cmd/stamp" run = "go build -o bin/stamp ./cmd/stamp"
@@ -12,3 +12,11 @@ run = "golangci-lint run"
[tasks.install] [tasks.install]
run = "go install ./cmd/stamp" run = "go install ./cmd/stamp"
[tasks.check]
description = "Run formatting, vet, build, and tests (the same checks CI runs)"
run = "./scripts/check.sh"
[tasks.deps]
description = "Check go.mod pins against the newest observed module releases"
run = "./scripts/check-deps.sh"
+172
View File
@@ -0,0 +1,172 @@
#!/usr/bin/env bash
#
# check-deps.sh fails when a module pinned in go.mod is older than the newest
# release we can authoritatively observe.
#
# Two sources are accepted, in order:
#
# 1. The module proxy. When GOPROXY is not "off", `go list -m -u` is the
# authority: it asks the proxy for the newest release of every pinned
# module. This is what CI uses.
#
# 2. The dependency facts prepared by the execution profile and named by
# MAINTAINER_DEPENDENCY_FACTS. The file records, for every module, the
# newest version that profile observed on proxy.golang.org and when. It is
# evidence rather than a live query, so the script prints its source and
# observation time and refuses to use reports it cannot validate as complete.
#
# The local module cache is never consulted: it only contains versions that
# happened to be downloaded, so it cannot establish what the newest release is.
# When neither source is available the script exits with status 2 instead of
# reporting success.
#
# Exit status: 0 = every pin is current, 1 = a pin is stale (or unverifiable
# for an individual module), 2 = freshness could not be established at all.
set -euo pipefail
root="${CHECK_DEPS_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
cd "$root"
facts_file="${MAINTAINER_DEPENDENCY_FACTS:-}"
# requirements prints "<path> <version>" for every module required by go.mod.
requirements() {
go mod edit -json | awk -F'"' '
/^\t"Require": \[/ { in_require = 1 }
in_require && /^\t\],?$/ { in_require = 0 }
in_require && /"Path":/ { path = $4 }
in_require && /"Version":/ { print path, $4 }
'
}
# behind reports whether version $1 is older than version $2.
behind() {
[ "$1" != "$2" ] && [ "$(printf '%s\n%s\n' "$1" "$2" | sort -V | tail -n 1)" = "$2" ]
}
pins="$(requirements)"
if [ -z "$pins" ]; then
echo 'go.mod requires no modules' >&2
exit 1
fi
count="$(printf '%s\n' "$pins" | wc -l | tr -d ' ')"
if [ "$(go env GOPROXY)" != "off" ]; then
mods=()
while read -r path version; do
mods+=("$path@$version")
done <<<"$pins"
if ! listing="$(go list -m -u -f '{{.Path}} {{.Version}} {{if .Update}}{{.Update.Version}}{{end}}' "${mods[@]}")"; then
echo 'could not query the module proxy for newer versions' >&2
exit 2
fi
updates="$(printf '%s\n' "$listing" | awk 'NF == 3')"
if [ -n "$updates" ]; then
echo 'These modules have newer versions available:' >&2
printf '%s\n' "$updates" >&2
exit 1
fi
echo "ok: $count go.mod requirements are up to date (module proxy)"
exit 0
fi
# Offline: fall back to the dependency facts prepared by the execution profile.
# The facts file is refreshed by the execution profile, so a reader can race
# with an atomic rewrite; give it a moment before declaring the facts missing.
if [ -n "$facts_file" ]; then
for _ in 1 2 3 4 5 6 7 8 9 10; do
[ -r "$facts_file" ] && break
sleep 0.2
done
fi
if [ -z "$facts_file" ] || [ ! -r "$facts_file" ]; then
echo 'cannot verify dependency freshness: the module proxy is disabled (GOPROXY=off)' \
'and MAINTAINER_DEPENDENCY_FACTS does not name a readable dependency-facts file' >&2
exit 2
fi
field() {
grep -o "\"$1\"[[:space:]]*:[[:space:]]*\"[^\"]*\"" "$facts_file" | head -n 1 | sed 's/.*:[[:space:]]*"\(.*\)"/\1/'
}
schema="$(grep -o '"schema_version"[[:space:]]*:[[:space:]]*[0-9]*' "$facts_file" | head -n 1 | grep -o '[0-9]*$' || true)"
source="$(field source)"
freshness="$(field freshness_status)"
scope="$(field query_scope)"
observed_at="$(field observed_at)"
digest="$(field manifest_digest)"
if [ "$schema" != 1 ]; then
echo "cannot verify dependency freshness: unsupported dependency-facts schema (${schema:-missing})" >&2
exit 2
fi
if [ "$source" != 'https://proxy.golang.org' ]; then
echo "cannot verify dependency freshness: unexpected dependency-facts source '${source}'" >&2
exit 2
fi
if [ "$freshness" != 'available' ]; then
echo "cannot verify dependency freshness: dependency facts are not marked available ('${freshness}')" >&2
exit 2
fi
if [ "$scope" != 'module_path_latest' ]; then
echo "cannot verify dependency freshness: dependency facts use query scope '${scope}', want module_path_latest" >&2
exit 2
fi
if [ -z "$observed_at" ]; then
echo 'cannot verify dependency freshness: dependency facts have no observation time' >&2
exit 2
fi
# One record per observed module: name, latest version and item status.
records="$(grep -o '{[^{}]*"latest"[^{}]*' "$facts_file" || true)"
if [ -z "$records" ]; then
echo 'cannot verify dependency freshness: dependency facts contain no module observations' >&2
exit 2
fi
latest_for() {
local want="$1" record name latest status
while IFS= read -r record; do
name="$(printf '%s\n' "$record" | sed -n 's/.*"name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')"
[ "$name" = "$want" ] || continue
latest="$(printf '%s\n' "$record" | sed -n 's/.*"latest"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')"
status="$(printf '%s\n' "$record" | sed -n 's/.*"status"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')"
[ "$status" = 'observed' ] || return 1
printf '%s\n' "$latest"
return 0
done <<<"$records"
return 1
}
stale=''
unverified=''
while read -r path version; do
if ! latest="$(latest_for "$path")"; then
unverified+=" $path $version (not covered by the dependency facts)"$'\n'
continue
fi
if behind "$version" "$latest"; then
stale+=" $path $version (latest observed: $latest)"$'\n'
elif [ "$version" != "$latest" ]; then
unverified+=" $path $version (pin is newer than the latest observation $latest)"$'\n'
fi
done <<<"$pins"
if [ -n "$stale" ]; then
echo 'These go.mod pins are behind the latest observed releases:' >&2
printf '%s' "$stale" >&2
exit 1
fi
if [ -n "$unverified" ]; then
echo 'These go.mod pins could not be checked against the dependency facts:' >&2
printf '%s' "$unverified" >&2
exit 1
fi
echo "ok: $count go.mod requirements match the latest releases observed by the execution profile"
echo "source: $source, observed at $observed_at (module_path_latest)"
if [ -n "$digest" ]; then
echo "note: dependency-facts manifest digest: $digest"
fi
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
#
# check.sh runs every verification step required before a change can land.
# `.gitea/workflows/ci.yml` invokes it on every pull request and every push to
# main, so this script is the single source of truth for what "CI passed" means.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
echo '==> ci workflow'
./scripts/test-ci-workflow.sh
echo '==> dependency check tests'
./scripts/test-check-deps.sh
echo '==> gofmt'
unformatted="$(gofmt -l .)"
if [ -n "$unformatted" ]; then
echo 'These files are not gofmt-formatted:' >&2
printf '%s\n' "$unformatted" >&2
exit 1
fi
echo '==> go mod verify'
go mod verify
echo '==> go vet'
go vet ./...
echo '==> go build'
go build ./...
echo '==> go test'
go test -cover ./...
+104
View File
@@ -0,0 +1,104 @@
#!/usr/bin/env bash
#
# test-check-deps.sh exercises scripts/check-deps.sh without a module proxy or
# network access. It builds throwaway manifests in a temporary directory and
# asserts the script's exit status and diagnostics.
set -euo pipefail
here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
script="$here/check-deps.sh"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
failures=0
expect_status() {
local want="$1" got
shift
set +e
"$@" >"$tmp/out" 2>&1
got=$?
set -e
if [ "$got" -ne "$want" ]; then
echo "FAIL: expected exit $want, got $got: $*" >&2
cat "$tmp/out" >&2
failures=$((failures + 1))
fi
}
# fixture sets up $tmp/repo/go.mod and prints the go.mod path.
fixture() {
mkdir -p "$tmp/repo"
cat >"$tmp/repo/go.mod" <<'EOF'
module example.com/fixture
go 1.27.1
require (
github.com/a/b v1.0.0
github.com/c/d v1.3.0
)
EOF
}
# facts writes a dependency-facts document to $tmp/facts.json.
# Arguments: <freshness_status> <item-json...>
facts() {
local freshness="$1"
shift
local items=''
local item
for item in "$@"; do
[ -z "$items" ] || items+=','
items+="$item"
done
cat >"$tmp/facts.json" <<EOF
{"schema_version":1,"observations":[{"ecosystem":"go","source":"https://proxy.golang.org","observed_at":"2026-10-28T09:00:00Z","manifest_digest":"abc123","command":["go","list","-m","-e","-json"],"items":[$items],"metadata":{"checksum_database":"sum.golang.org","freshness_status":"$freshness","graph_command":"go list -m -json all","query_scope":"module_path_latest"}}]}
EOF
}
up_to_date='{"name":"github.com/a/b","current":"v1.0.0","latest":"v1.0.0","status":"observed"},{"name":"github.com/c/d","current":"v1.3.0","latest":"v1.3.0","status":"observed"}'
# 1. Every pin matches the latest observation.
fixture
facts available "$up_to_date"
expect_status 0 env CHECK_DEPS_ROOT="$tmp/repo" MAINTAINER_DEPENDENCY_FACTS="$tmp/facts.json" GOPROXY=off "$script"
grep -q 'ok: 2 go.mod requirements' "$tmp/out" || { echo 'FAIL: missing success summary' >&2; failures=$((failures + 1)); }
# 2. A stale pin is reported and fails.
fixture
facts available '{"name":"github.com/a/b","current":"v1.0.0","latest":"v1.2.0","status":"observed"},{"name":"github.com/c/d","current":"v1.3.0","latest":"v1.3.0","status":"observed"}'
expect_status 1 env CHECK_DEPS_ROOT="$tmp/repo" MAINTAINER_DEPENDENCY_FACTS="$tmp/facts.json" GOPROXY=off "$script"
grep -q 'github.com/a/b v1.0.0 (latest observed: v1.2.0)' "$tmp/out" || { echo 'FAIL: stale module not named' >&2; failures=$((failures + 1)); }
# 3. A pin that is newer than the observation cannot be verified.
fixture
facts available '{"name":"github.com/a/b","current":"v1.0.0","latest":"v1.0.0","status":"observed"}'
expect_status 1 env CHECK_DEPS_ROOT="$tmp/repo" MAINTAINER_DEPENDENCY_FACTS="$tmp/facts.json" GOPROXY=off "$script"
grep -q 'not covered by the dependency facts' "$tmp/out" || { echo 'FAIL: uncovered module not reported' >&2; failures=$((failures + 1)); }
# 4. Without a proxy and without facts nothing is verified.
fixture
expect_status 2 env CHECK_DEPS_ROOT="$tmp/repo" MAINTAINER_DEPENDENCY_FACTS="$tmp/missing.json" GOPROXY=off "$script"
grep -q 'cannot verify dependency freshness' "$tmp/out" || { echo 'FAIL: unverified run did not explain itself' >&2; failures=$((failures + 1)); }
# 5. Incomplete dependency facts are not trusted.
fixture
facts unavailable "$up_to_date"
expect_status 2 env CHECK_DEPS_ROOT="$tmp/repo" MAINTAINER_DEPENDENCY_FACTS="$tmp/facts.json" GOPROXY=off "$script"
# 6. Items that were not observed are not treated as current.
fixture
facts available '{"name":"github.com/a/b","current":"v1.0.0","latest":"v1.0.0","status":"not_found"},{"name":"github.com/c/d","current":"v1.3.0","latest":"v1.3.0","status":"observed"}'
expect_status 1 env CHECK_DEPS_ROOT="$tmp/repo" MAINTAINER_DEPENDENCY_FACTS="$tmp/facts.json" GOPROXY=off "$script"
# 7. A facts document from a different source is rejected.
fixture
sed 's#https://proxy.golang.org#https://example.invalid#' "$tmp/facts.json" >"$tmp/other.json"
expect_status 2 env CHECK_DEPS_ROOT="$tmp/repo" MAINTAINER_DEPENDENCY_FACTS="$tmp/other.json" GOPROXY=off "$script"
if [ "$failures" -ne 0 ]; then
echo "$failures check-deps test(s) failed" >&2
exit 1
fi
echo 'ok: check-deps.sh behaviour is covered'
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
#
# test-ci-workflow.sh checks the properties of .gitea/workflows/ci.yml that
# gate pull requests. It runs without Go modules so CI configuration can be
# validated even when the module proxy is unavailable; the equivalent Go test
# in internal/ci/workflow_test.go parses the same file as YAML.
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
workflow="$root/.gitea/workflows/ci.yml"
if [ ! -f "$workflow" ]; then
echo "missing workflow: $workflow" >&2
exit 1
fi
failures=0
require_line() {
if ! grep -qF "$1" "$workflow"; then
echo "workflow is missing: $1" >&2
failures=$((failures + 1))
fi
}
require_line 'on:'
require_line ' pull_request:'
require_line ' push:'
require_line 'branches: [main]'
require_line 'run: ./scripts/check.sh'
require_line 'run: ./scripts/check-deps.sh'
require_line 'go-version-file: go.mod'
# The workflow must be a single action so "all checks passed" has one meaning.
jobs="$(awk '/^jobs:/{j=1;next} j && /^ [a-z0-9_-]+:$/{n++} END{print n+0}' "$workflow")"
if [ "$jobs" -ne 1 ]; then
echo "workflow must define exactly one job, found $jobs" >&2
failures=$((failures + 1))
fi
if [ "$failures" -ne 0 ]; then
exit 1
fi
echo 'ok: the pull request workflow runs the repository checks'