44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
"""Shared configuration constants for GRM scripts and API clients."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import re
|
|
|
|
GITEA_API_URL = "https://git.oblachno.oblachno.fyi/api/v1"
|
|
VIKUNJA_API_URL = "https://work.oblachno.oblachno.fyi/api/v1"
|
|
|
|
REPO_OWNER = "oblachno-oss"
|
|
REPO_NAME = "grm"
|
|
|
|
VIKUNJA_PROJECT_ID = 6
|
|
|
|
TASK_ID_RE = re.compile(r"GRM-\d+")
|
|
CONVENTIONAL_RE = re.compile(
|
|
r"^(feat|fix|chore|docs|style|refactor|perf|test|ci|build|revert|BREAKING CHANGE)(\(.+\))?: .+"
|
|
)
|
|
|
|
DEFAULT_TIMEOUT = 30
|
|
DEFAULT_PER_PAGE = 50
|
|
|
|
BRANCH_PROTECTION_CONFIG: dict[str, object] = {
|
|
"branch_name": "master",
|
|
"enable_push": False,
|
|
"enable_status_check": True,
|
|
"status_check_contexts": ["lint", "unit-tests", "molecule-tests"],
|
|
"required_approvals": 1,
|
|
"dismiss_stale_approvals": True,
|
|
"block_on_outdated_branch": True,
|
|
"block_on_rejected_reviews": True,
|
|
"block_on_official_review_requests": True,
|
|
}
|
|
|
|
LABEL_CONFIG: dict[str, object] = {
|
|
"name": "ready-to-merge",
|
|
"color": "2ecc71",
|
|
"description": "Auto-merge PR when all CI checks pass",
|
|
}
|
|
|
|
REPO_SETTINGS_CONFIG: dict[str, object] = {
|
|
"default_delete_branch_after_merge": True,
|
|
}
|