guard reviews against issue rediscovery
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
python -c '
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
config_dir = Path(os.environ["XDG_CONFIG_HOME"]) / "tea"
|
||||
config_dir.mkdir(parents=True, exist_ok=True)
|
||||
config_path = config_dir / "config.yml"
|
||||
token_path = Path(
|
||||
os.environ.get("AGENTCI_GITEA_TOKEN_FILE", "/run/secrets/gitea_token")
|
||||
)
|
||||
login = {
|
||||
"name": "agentci",
|
||||
"url": os.environ.get("AGENTCI_GITEA_URL", "http://gitea:3000"),
|
||||
"token": token_path.read_text().strip(),
|
||||
"default": True,
|
||||
"version_check": False,
|
||||
}
|
||||
config_path.write_text(json.dumps({"logins": [login], "preferences": {}}))
|
||||
config_path.chmod(0o600)
|
||||
'
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user