Set the project license in config.env; AGPL-3.0 default only for a public GitHub project

- PROJECT_LICENSE (a Gitea license key, or none) is read, checked and never asked
- Without it AGPL-3.0 applies only when GitHub is chosen and the project is public
- The license is applied on Gitea with or without GitHub, and checked against the server first
- Plan and summary name the license and where it came from
- MIL-006 accepted; README and config.env.example document the key
- Tests: new test-license.sh; existing tests use a public project where they expect AGPL-3.0

Task: MIL-006#1
Task: MIL-006#2
Task: MIL-006#3
Task: MIL-006#4
Refs #44
Refs #45
Refs #46
Refs #50
This commit is contained in:
2026-10-07 13:08:49 +08:00
parent b324acbfae
commit e960dd9da8
19 changed files with 279 additions and 40 deletions
+2 -2
View File
@@ -18,8 +18,8 @@ repo_body() {
"${PROJECT[name]}" "$description" "$private"
return 0
fi
if ((PROJECT[has_github])); then
extra=',"auto_init":true,"license":"'"$AGPL_LICENSE_KEY"'"'
if [[ -n ${PROJECT[license]} ]]; then
extra=',"auto_init":true,"license":"'"${PROJECT[license]}"'"'
else
extra=',"auto_init":false'
fi