Commit graph

3,067 commits

Author SHA1 Message Date
e48604d018 Merge pull request #70 from pazof/copilot/fix-validate-release-job
fix(ci): validate-release channel check always failed for stable/preview tags
2026-08-17 02:05:01 +01:00
copilot-swe-agent[bot]
977f703d48 fix(ci): fix validate-release CHANGELOG channel check to inspect heading line
Co-authored-by: pazof <3072814+pazof@users.noreply.github.com>
2026-08-17 01:02:14 +00:00
copilot-swe-agent[bot]
e6670a9b2d Initial plan 2026-08-17 01:00:12 +00:00
8795e8b60e Merge pull request 'fix/workflow-checkout-fetch-depth' (#21) from fix/workflow-checkout-fetch-depth into main
Reviewed-on: #21
2026-08-17 00:15:45 +01:00
5740618717 Merge pull request #69 from pazof/fix/workflow-checkout-fetch-depth
Fix/workflow checkout fetch depth
2026-08-17 00:09:25 +01:00
f1c80e51a4 Checkout
1. complet de l’historique Git et des tags dans le job qui build l’APK via Docker:
2. with tags
2026-08-17 00:06:32 +01:00
06db08baff Merge pull request 'ci(release): re-check release/1.0.6 with billing init fix' (#20) from fix/post-release-recheck into release/1.0.6
Reviewed-on: #20
2026-08-16 16:52:11 +01:00
ef821aa134 ci: re-check CI on release/1.0.6 with billing init fix 2026-08-16 16:49:44 +01:00
6be7450cf7 Merge pull request 'fix(billing): tolerate ReflectionTypeLoadException during init' (#19) from fix/billing-init-reflection into release/1.0.6
Reviewed-on: #19
2026-08-16 16:43:09 +01:00
a7819bb88b fix(billing): tolerate ReflectionTypeLoadException during init
ConfigureBillingService() walks AppDomain.CurrentDomain.GetAssemblies()
and calls Assembly.GetTypes() on each. If any of the loaded assemblies
has a type that fails to resolve (a flaky dependency, an AddOn with a
broken reference, a test dependency that's been rewritten after compile),
GetTypes() throws ReflectionTypeLoadException (or, less commonly,
FileNotFoundException / TypeLoadException for the assembly itself).

In CI on the forgejo-runner (and especially in test discovery under
xunit v3), one such assembly is loaded somewhere between test runs and
silently throws. The exception is not handled, so:

  1. Collections are Cleared at the top of ConfigureBillingService().
  2. The reflection loop throws before reaching the
     RegisterBilling<HairCutQuery/HairMultiCutQuery/RdvQuery> calls.
  3. BillingService.Billing ends up empty (Count = 0).
  4. The second ConfigureBillingService() call sees the same assembly
     loaded (xunit v3 keeps the AppDomain warm for the whole suite),
     throws identically, and the test
     Yavsc.BillingServiceTests.ConfigureBillingService_CanBeCalledTwiceWithoutThrowing
     fails with 'Assert.Equal() Failure: Expected 3, Actual 0'.

Fix: catch ReflectionTypeLoadException and use the partial
.Types() list (the successfully-resolved subset), and use a
broader catch (with continue) for any other assembly-level
load failure. The lost user-settings types are not material;
they are derived from ApplicationDbContext in a separate loop
right after, and the RegisterBilling<>() calls that populate
BillingService.Billing run last, after both reflective phases
have completed best-effort.

The test still passes locally because the local test environment
loads a clean set of assemblies; only the CI runner (with its
extra test-time tooling) hits this path.
2026-08-16 16:35:05 +01:00
78b7dec6a1 release: 1.0.6
Patch is even (6) and bare, so this is classified as 'stable' by
the validate-release job in .github/workflows/docker-publish-android.yml.

Move the Unreleased section up by inserting [1.0.6] below it, with
a list of changes that landed on this release:

  - Self-hosted Forgejo Actions runner now drives CI on yavsc,
    using pazof/yavsc-build-env:debian12-dotnet10-android36-v1
    pulled from Docker Hub.
  - .forgejo/workflows/buildAndTest.yml builds without
    actions/checkout (image has no Node) and uses NuGet.config
    for the isn.pschneider.fr feed.
  - Dockerfile / Dockerfile.backend drop the redundant
    'dotnet nuget add source' step that broke the APK build on
    GitHub Actions.
2026-08-16 16:18:37 +01:00
bd31225c40 Merge branch 'main' into feat/postit-release-page 2026-08-16 16:07:16 +01:00
edbb3bc24b Merge pull request 'dockerfile: drop inline 'dotnet nuget add source isn.pschneider.fr'' (#18) from fix/github-action-apk into main
Reviewed-on: #18
2026-08-16 15:51:08 +01:00
3b4811fb21 dockerfile: drop inline 'dotnet nuget add source isn.pschneider.fr'
The project-level NuGet.config (added in 7a9b831c) lists the isn feed
so 'dotnet restore' picks it up without an inline 'dotnet nuget add
source' step.

The inline add source was duplicating NuGet.config and causing build
failures in GitHub Actions:
  - The --allow-insecure-connections flag did not match the actual
    HTTPS deployment of isn.pschneider.fr (Letsencrypt-issued cert,
    not self-signed), making the step fail with 'exit code 1'.
  - docker build --target build-env (used by
    .github/workflows/docker-publish-android.yml) hit this on every
    run.

Both Dockerfile and Dockerfile.backend had the same redundant step;
both removed. 'dotnet restore' still finds the feed via NuGet.config
at /src/NuGet.config (copied in by 'COPY . .').
2026-08-16 14:10:10 +01:00
cc942b33b7 dockerfile: drop inline 'dotnet nuget add source isn.pschneider.fr'
The project-level NuGet.config (added in 7a9b831c) lists the isn feed
so 'dotnet restore' picks it up without an inline 'dotnet nuget add
source' step.

The inline add source was duplicating NuGet.config and causing build
failures in GitHub Actions:
  - The --allow-insecure-connections flag did not match the actual
    HTTPS deployment of isn.pschneider.fr (Letsencrypt-issued cert,
    not self-signed), making the step fail with 'exit code 1'.
  - docker build --target build-env (used by
    .github/workflows/docker-publish-android.yml) hit this on every
    run.

Both Dockerfile and Dockerfile.backend had the same redundant step;
both removed. 'dotnet restore' still finds the feed via NuGet.config
at /src/NuGet.config (copied in by 'COPY . .').
2026-08-16 14:09:11 +01:00
1226144437 Merge pull request 'forgejo/ci: run build in pazof/yavsc-build-env container' (#17) from feat/postit-release-page into main
Reviewed-on: #17
2026-08-16 13:50:12 +01:00
19d5ff2ecb ci: unshallow clone for GitVersion
GitVersion.MsBuild fails on shallow clones ('Repository is a shallow
clone. Git repositories must contain the full history.') because it
walks the git log to compute the SemVer version.

Drop --depth 1 from both the PR ref fetch and the submodule update
so the runner's working tree has full history. The repo is small
enough that the cost is negligible.
2026-08-16 13:39:53 +01:00
7a9b831c1a nuget: add NuGet.config pointing at isn.pschneider.fr
The yavsc solution depends on HigginsSoft.IdentityServer8.* 8.1.0-alpha.*,
which is only published on the internal feed https://isn.pschneider.fr.
Public nuget.org has 8.0.4 as the nearest version, so every project that
uses IdentityServer8 (Yavsc.Org, Yavsc.Api, Yavsc.Blogs, Yavsc.Server,
cli, Yavsc.Org.Tests, Yavsc.Blogs.Tests) fails with NU1102 on restore.

Both feeds are reachable anonymously, so listing isn first and
nuget.org second in a project-level config restores everything without
credentials. The CI runner on forgejo now sees the same sources as a
local clone.
2026-08-16 13:35:44 +01:00
8bfa947148 ci: drop working-directory, cd into /src/_src explicitly
forgejo-runner v13 does not interpolate ${{ runner.workspace }}
in working-directory: (or ignores the field entirely for docker
containers), so the container tried to chdir to '/_src' (literally)
which does not exist.

The image WORKDIR is /src, so clone directly into /src/_src and cd
into it at the start of each step. Adds an echo of the checkout
SHA + branch state for visibility in the log.
2026-08-16 13:27:36 +01:00
4717cfb76e submodule: switch URL from SSH to HTTPS for forgejo anonymous access
The runner container does not have an SSH client, and even if it
did, no key is configured for it. Forgejo Actions must reach the
submodule over HTTPS with anonymous read access (which is now
enabled on the Forgejo instance).

Use 'git submodule sync --recursive' on the developer side after
checkout to propagate the URL change to .git/modules/.
2026-08-16 13:26:12 +01:00
b168232c5b ci: clone via GITHUB_REF instead of GITHUB_REF_NAME
In pull_request context, GITHUB_REF_NAME is the PR number ('17'),
not the source branch. Cloning --branch 17 fails with
'Could not find remote branch 17 to clone'.

Use GITHUB_REF (refs/pull/N/head in PR context, refs/heads/<branch>
in push context) and fetch + checkout FETCH_HEAD. workflow_dispatch
falls back to the default branch.
2026-08-16 13:22:56 +01:00
00ece4f21f ci: replace actions/checkout with manual git clone (image has no node)
The pazof/yavsc-build-env:debian12-dotnet10-android36-v1 image only
ships .NET 10 SDK + Android SDK + JDK 17, no Node. actions/checkout@v6
requires Node, so the job failed with 'exec: node not found'.

Replace actions/checkout with a direct git clone over HTTPS (Forgejo
anonymous is enabled), and init submodules recursively.

Also drop the bogus docker://image:tag runs-on: matcher, use just 'docker'
to match the runner's declared label name.
2026-08-16 13:15:10 +01:00
f0f921b9de run on docker 2026-08-16 13:03:17 +01:00
befc08dcb8 dotnet-android-build-image: pin to <sha-ou-tag> 2026-08-16 12:49:50 +01:00
00c463a48e forgejo/ci: run build in pazof/yavsc-build-env container
Le workflow buildAndTest tournait sur un runner nu debian-latest avec
setup-dotnet@v5 pour la SDK 10.0.x. Restore échouait car cet
environnement n'a ni la source NuGet interne (isn.pschneider.fr) ni
les workloads Android configurés, contrairement à l'image
pazof/yavsc-build-env utilisée par le Dockerfile.

Bascule le job sur un runner labelisé docker avec l'image
debian12-dotnet10-android36-v1 directement. Le step setup-dotnet
devient inutile (l'image a déjà la SDK 10.0), le restore partage
la même config que le Dockerfile.

Refs l'image cible par ARG BUILD_ENV_TAG=debian12-dotnet10-android36-v1.
2026-08-15 22:18:03 +01:00
e32f107010 Merge pull request 'postit: validate CHANGELOG section on tag, classify stable/preview/unstable' (#16) from feat/postit-release-page into main
Reviewed-on: #16
2026-08-15 22:02:18 +01:00
bdaeecc7b8 forgejo/ci: pin dotnet sdk 10.0.x for buildAndTest
Le repo cible net10.0 partout (csproj, TFM), mais le workflow CI
Forgejo buildAndTest installait une SDK 9.0.x. Aligne sur 10.0.x
pour que la CI build avec une SDK qui connaît le TFM net10.0.

Pas de global.json ajouté : la SDK est résolue à l'installation
de l'image runner, le repo reste agnostique de la version exacte.
2026-08-15 22:00:36 +01:00
3a3335bd9e Merge branch 'main' into feat/postit-release-page 2026-08-15 20:35:39 +01:00
857b752ec7 postit: validate CHANGELOG section on tag, classify stable/preview/unstable
Rend le job publish-release dépendant d'un nouveau job validate-release
qui :
- parse le tag (format MAJOR.MINOR.PATCH[-SUFFIX])
- classifie le canal : pair=stable, impair=preview, suffixe=instable
- fail-fast sur instable sauf opt-in explicite via workflow_dispatch
- vérifie que CHANGELOG.md contient une section ## [<tag>] - <canal>
- expose le body de la section via $GITHUB_ENV pour le job de publication

Le tag trigger passe de 'v*' à '*' (pas de préfixe sur les tags), et
le corps de release GitHub est désormais curé via CHANGELOG.md plutôt
que généré automatiquement.

Cette convention de parité est partagée avec le dépôt postit-debian
pour la production des paquets .deb (alignement à traiter dans une PR
séparée).
2026-08-15 20:34:47 +01:00
0f50b0d094 Merge pull request 'feat/postit-release-page' (#15) from feat/postit-release-page into main
Reviewed-on: #15
2026-08-15 18:13:05 +01:00
fe71b822b5 postit: validate CHANGELOG section on tag, classify stable/preview/unstable 1.0.5
Rend le job publish-release dépendant d'un nouveau job validate-release
qui :
- parse le tag (format MAJOR.MINOR.PATCH[-SUFFIX])
- classifie le canal : pair=stable, impair=preview, suffixe=instable
- fail-fast sur instable sauf opt-in explicite via workflow_dispatch
- vérifie que CHANGELOG.md contient une section ## [<tag>] - <canal>
- expose le body de la section via $GITHUB_ENV pour le job de publication

Le tag trigger passe de 'v*' à '*' (pas de préfixe sur les tags), et
le corps de release GitHub est désormais curé via CHANGELOG.md plutôt
que généré automatiquement.

Cette convention de parité est partagée avec le dépôt postit-debian
pour la production des paquets .deb (alignement à traiter dans une PR
séparée).
2026-08-15 15:51:42 +01:00
be502593c3 postit: add CHANGELOG.md with Keep a Changelog format
Initialise le changelog du projet au format Keep a Changelog 1.1.0,
en français, avec une section [Unreleased] vide prête à être curée
au moment de la première release.

Le préambule documente la convention de parité du patch :
- pair → stable
- impair → preview
- suffixe → instable

Cette convention est partagée avec le dépôt postit-debian pour la
production des paquets .deb (alignement à traiter dans une PR séparée).
2026-08-15 15:44:47 +01:00
fa886be84f Add comments API support and tests 2026-08-10 22:27:52 +01:00
66fcdc68d4 Fix blog comment endpoint path and add regression test 2026-08-10 21:48:03 +01:00
4e1ceb729c GetUserId_reads_NameIdentifier_when_sub_was_mapped 2026-08-10 18:34:01 +01:00
633a305c35 Activity protection 2026-08-10 18:12:59 +01:00
e17b24afe7 re-refacto BlogPost serialization 2026-08-05 21:11:22 +01:00
0a76784858 refacto BlogPost serialization 2026-08-05 21:05:14 +01:00
7755e214e4 Merge pull request 'publish android' (#13) from build into main 1.0.4
Reviewed-on: #13
2026-08-03 02:36:11 +01:00
22d8974aab publish android 2026-08-03 02:35:50 +01:00
42ae86f050 Merge pull request 'build' (#12) from build into main
Reviewed-on: #12
2026-08-03 02:17:32 +01:00
17e33ebea9 build 2026-08-03 02:16:57 +01:00
c3388e3e2a Enable blogs on connected status 2026-08-03 01:48:15 +01:00
ec0085b7e3 refacto blogPost 2026-08-03 01:36:12 +01:00
d9d5aed385 Merge pull request 'ci: publish APK to GitHub release on v* tag' (#11) from release into main
Reviewed-on: #11
2026-08-02 23:29:21 +01:00
c6366bbda4 ci: publish APK to GitHub release on v* tag
Adds a publish-release job that triggers only on tag pushes (refs/tags/v*).
It reuses the APK artifact uploaded by apk-deploy, publishes a GitHub
release via softprops/action-gh-release, and attaches the APK.

Result: a stable permalink to the latest APK at
  https://github.com/<owner>/<repo>/releases/latest/download/PostIt.Android.apk
2026-08-02 23:23:00 +01:00
367afb005b Merge pull request 'Le créateur vient de l'authentification, donc on ne le prend pas du post' (#10) from fix/OIDC-debugging into main
Reviewed-on: #10
2026-08-02 23:04:09 +01:00
ce075b3aee Le créateur vient de l'authentification, donc on ne le prend pas du post 2026-08-02 23:02:54 +01:00
337884d831 Merge pull request 'postit: allow self-signed OIDC TLS in Development' (#9) from fix/OIDC-debugging into main
Reviewed-on: #9
2026-08-02 21:32:49 +01:00
e92be558de Navigate to Main Page 2026-08-02 21:08:25 +01:00