Commit graph

11 commits

Author SHA1 Message Date
Stefan Hausotte
a8ce9d1180 ci: make release recipe sed portable across BSD and GNU sed (#83)
`just release` used `sed -i ''`, which is BSD/macOS syntax. In the nix dev
shell GNU sed shadows it and reads `''` as an empty script and the s/.../
expression as a filename, aborting the version bump. Use `-i.bak` plus a
cleanup `rm`, which works on both BSD and GNU sed.

Reviewed-on: https://codeberg.org/secana/Forji/pulls/83
2026-06-15 19:06:16 +02:00
Stefan Hausotte
d580156fa2 ci: add automatic changelog creation 2026-06-04 15:03:47 +02:00
Stefan Hausotte
db4e54db6b chore: add "just sim-update" command
Updates the iOS simulators to the latest version in XCode
2026-05-10 11:01:40 +02:00
Voislav Vasiljevski
3d3de81f2b [Draft] feat: Actions tab — depends on ForgejoKit#1 (#28)
Closes #3.

Adds an "Actions" tab to the repository view, surfacing Forgejo Actions runs and (experimentally) their jobs, steps, and logs.

## What's in this branch

1. ~~**`chore: point ForgejoKit at local checkout for Actions PR`** — temporary `XCLocalSwiftPackageReference` so the feature commit compiles against the unreleased ForgejoKit changes. Drop this commit before merge and replace with `chore: bump ForgejoKit to <new version>` once the ForgejoKit PR ships in a release.~~

   **`chore: update ForgejoKit to released version 0.4.0`** + **`chore: add ForgejoKit 0.4.0 to Package.resolved`** — switches from local path override to a remote pin at `secana/ForgejoKit` `0.4.0`.

2. **`feat: add Actions tab to repository view`** — the actual feature.

## UI scope

- New `Actions` tab, shown only when `repository.hasActions == true`.
- Runs list with All / Running / Success / Failed filter, pagination, pull-to-refresh, empty state.
- Run detail with header, metadata (workflow file, event, trigger user, started/duration — zero-Date suppressed), and an experimental Jobs section.
- Job view with collapsible step rows; logs lazy-load on expand via `logCursors`.
- "Open in browser" toolbar item using each run's `html_url`.

## Experimental jobs/steps view

Forgejo's `/api/v1` doesn't expose jobs, steps, or step logs for a run. This PR opts into ForgejoKit's experimental `fetchRunView` (backed by Forgejo's web-UI route) so we can render a GitHub-Actions-style view today. The Jobs section and Steps screen are explicitly labelled "Experimental" in the UI, and a footer notes the output may change between Forgejo versions. Happy to drop this section if you'd rather ship public-API only first.

## Defensive handling

- Forgejo serialises an unset `time.Time` as `0001-01-01T00:00:00Z` (showed up as "Started 56 yrs, 4 mths" / "Duration 493 906h" on a cancelled run). Sanitised display helpers suppress any pre-2000 date.
- The experimental `fetchRunView` resolves Forgejo's `RedirectToLatestAttempt` server-side before POSTing, so attempts with non-zero attempt numbers work. (Without this, Forgejo returns 500 "task with job_id N and attempt 0: resource does not exist".)

## Tests

- Unit: `WorkflowRunFilterTests`, `WorkflowStatusIconTests` (filter mapping, status enum compatibility against Forgejo's documented values, status icon mapping, run helpers, zero-date guard).
- UI: `ActionsUITests` (read-only smoke test).

Co-authored-by: Voislav Vasiljevski <voislav@voioo.cz>
Reviewed-on: https://codeberg.org/secana/Forji/pulls/28
2026-05-07 18:06:17 +02:00
Stefan Hausotte
c42ed9552e test: improve test runtime
Reviewed-on: https://codeberg.org/secana/Forji/pulls/24
Co-authored-by: Stefan Hausotte <stefan.hausotte@gmx.de>
Co-committed-by: Stefan Hausotte <stefan.hausotte@gmx.de>
2026-03-23 19:07:55 +01:00
Stefan Hausotte
10bbed5596 feat: combined instance view (#18)
Co-authored-by: Stefan Hausotte <stefan.hausotte@gmx.de>
Co-committed-by: Stefan Hausotte <stefan.hausotte@gmx.de>
2026-03-21 15:03:28 +01:00
Stefan Hausotte
3adda37fb1 refactor: clean up justfile 2026-03-12 19:37:33 +01:00
Stefan Hausotte
6596f6116d test: switch from bash to swift for integration test setup 2026-03-11 22:44:19 +01:00
Stefan Hausotte
f5849f4b69 docs: change the way the version is set 2026-03-08 20:02:12 +01:00
Stefan Hausotte
d5e7ccdc4d ci: add clean up command for integration tests 2026-03-08 18:24:07 +01:00
Stefan Hausotte
5adc0102eb feat: inital commit
Forji is an iOS app to interact with a Forgejo instance
2026-02-28 21:08:13 +01:00