Accept TOKEN_FOR_GITEA_WIKI in .env and move the token howto to the wiki
TOKEN_FOR_GITEA_WIKI is an optional key, checked and masked but never used or asked for, so one .env can serve the wiki publishing too. GITHUB_PAT and GITHUB_USER are documented as required only when GitHub is chosen. The how-to for creating the access tokens moves from howto/ to the wiki as AccessTokens in English, Danish and Bahasa Malaysia, with its pictures in wiki/img/. README, Home and the sidebar link to it. Adds MIL-010 with its review RC-033 and the matching plan, user story and traceability rows. Task: MIL-010#1 Task: MIL-010#2 Task: MIL-010#3 Closes #83 Closes #84 Closes #85
This commit is contained in:
@@ -40,8 +40,9 @@
|
||||
# the optional GITEA_SSH_PORT (default 10022), MIRROR_INTERVAL
|
||||
# (default 10m0s) and FRAMEWORK_REPO (default
|
||||
# TirSystem/SQA-QC-Framework, the submodule's OWNER/NAME)
|
||||
# .env GITHUB_PAT, GITHUB_USER, GITEA_TOKEN (all optional, each
|
||||
# asked when missing)
|
||||
# .env GITHUB_PAT, GITHUB_USER (required only when GitHub is chosen),
|
||||
# GITEA_TOKEN (always required); each is asked when missing.
|
||||
# TOKEN_FOR_GITEA_WIKI is optional and not used here
|
||||
#
|
||||
# Environment
|
||||
# REPOFOUNDRY_NAME project name used in messages (default: RepoFoundry)
|
||||
|
||||
@@ -155,6 +155,11 @@ validate_credentials() {
|
||||
if [[ -n ${CREDENTIALS[GITHUB_PAT]:-} ]]; then
|
||||
SECRET_VALUES+=("${CREDENTIALS[GITHUB_PAT]}")
|
||||
fi
|
||||
if [[ -n ${CREDENTIALS[TOKEN_FOR_GITEA_WIKI]:-} ]]; then
|
||||
SECRET_VALUES+=("${CREDENTIALS[TOKEN_FOR_GITEA_WIKI]}")
|
||||
is_valid_token "${CREDENTIALS[TOKEN_FOR_GITEA_WIKI]}" ||
|
||||
die "TOKEN_FOR_GITEA_WIKI in $ENV_FILE is not a valid token ($HINT_TOKEN)"
|
||||
fi
|
||||
if [[ -n ${CREDENTIALS[GITEA_TOKEN]:-} ]] &&
|
||||
! is_valid_token "${CREDENTIALS[GITEA_TOKEN]}"; then
|
||||
die "GITEA_TOKEN in $ENV_FILE is not a valid token ($HINT_TOKEN)"
|
||||
|
||||
@@ -41,7 +41,9 @@ readonly CONFIG_KEYS=(GITHUB_API_URL GITHUB_WEB_URL GITEA_URL GITEA_API_URL
|
||||
GITEA_SSH_PORT MIRROR_INTERVAL FRAMEWORK_REPO
|
||||
PROJECT_NAME PROJECT_DESCRIPTION PROJECT_VISIBILITY GITEA_OWNER USE_GITHUB
|
||||
GITHUB_OWNER PROJECT_DIRECTORY ENABLE_PLAN_GATE PROJECT_LICENSE)
|
||||
readonly CREDENTIAL_KEYS=(GITHUB_PAT GITHUB_USER GITEA_TOKEN)
|
||||
# TOKEN_FOR_GITEA_WIKI belongs to the wiki publishing; it is accepted so that
|
||||
# one .env can serve both, checked and kept secret, but never used here.
|
||||
readonly CREDENTIAL_KEYS=(GITHUB_PAT GITHUB_USER GITEA_TOKEN TOKEN_FOR_GITEA_WIKI)
|
||||
|
||||
# The configuration files: named by --config and --env, or chosen by
|
||||
# locate_config_file. The origin is named, folder or checkout.
|
||||
|
||||
Reference in New Issue
Block a user