Public Access
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89a165be46 | ||
|
|
388c3df043 | ||
|
|
ac8a1d3be4 | ||
|
|
07cca5de36 |
@@ -7,10 +7,15 @@ name: Post-merge
|
|||||||
# Job dependency graph:
|
# Job dependency graph:
|
||||||
#
|
#
|
||||||
# detect-type ──┬── release (skip if release commit)
|
# detect-type ──┬── release (skip if release commit)
|
||||||
# ├── sync-wiki (skip if release commit)
|
|
||||||
# ├── badges (ALWAYS runs — even on release commits)
|
# ├── badges (ALWAYS runs — even on release commits)
|
||||||
# ├── vikunja (skip if release commit)
|
# ├── configure-repo (independent — skip if release commit)
|
||||||
# └── configure-repo (skip if release commit)
|
# ├── sync-wiki (needs release — skip if release commit/fails)
|
||||||
|
# └── vikunja (needs release — skip if release commit/fails)
|
||||||
|
#
|
||||||
|
# sync-wiki and vikunja depend on release succeeding so that the wiki
|
||||||
|
# and task tracker are only updated when the code is actually released.
|
||||||
|
# If release fails, they are skipped to avoid leaving the wiki or
|
||||||
|
# Vikunja in an inconsistent state with the codebase on master.
|
||||||
#
|
#
|
||||||
# The badges job depends on release so it picks up the latest version
|
# The badges job depends on release so it picks up the latest version
|
||||||
# number. It uses `if: always()` with no is-release condition so it
|
# number. It uses `if: always()` with no is-release condition so it
|
||||||
@@ -106,7 +111,7 @@ jobs:
|
|||||||
--commit "${{ github.sha }}"
|
--commit "${{ github.sha }}"
|
||||||
|
|
||||||
sync-wiki:
|
sync-wiki:
|
||||||
needs: [detect-type]
|
needs: [detect-type, release]
|
||||||
if: needs.detect-type.outputs.is-release == 'false'
|
if: needs.detect-type.outputs.is-release == 'false'
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
@@ -173,7 +178,7 @@ jobs:
|
|||||||
--commit "${{ github.sha }}"
|
--commit "${{ github.sha }}"
|
||||||
|
|
||||||
vikunja:
|
vikunja:
|
||||||
needs: [detect-type]
|
needs: [detect-type, release]
|
||||||
if: needs.detect-type.outputs.is-release == 'false'
|
if: needs.detect-type.outputs.is-release == 'false'
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
@@ -221,7 +226,6 @@ jobs:
|
|||||||
- name: Ensure branch protection and labels
|
- name: Ensure branch protection and labels
|
||||||
env:
|
env:
|
||||||
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
|
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
|
||||||
DEVX_PUSH_WHITELIST: "emil"
|
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
run: python3 -m devx.tools.configure_repo --repo devx --owner oblachno-oss
|
run: python3 -m devx.tools.configure_repo --repo devx --owner oblachno-oss
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
## [0.1.0] - 2026-06-22
|
## [0.1.0] - 2026-06-22
|
||||||
|
|
||||||
|
## [0.1.0] - 2026-06-22
|
||||||
|
|
||||||
|
## [0.1.0] - 2026-06-22
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Extract reusable dev/CI tools from GRM into devx package
|
- Extract reusable dev/CI tools from GRM into devx package
|
||||||
|
|||||||
@@ -39,16 +39,15 @@ def _default_branch_protection_config() -> dict[str, Any]:
|
|||||||
environment variable (comma-separated) or default to just the quality
|
environment variable (comma-separated) or default to just the quality
|
||||||
check context.
|
check context.
|
||||||
|
|
||||||
The ``push_whitelist_usernames`` is read from ``DEVX_PUSH_WHITELIST``
|
Push whitelist is disabled — the release script pushes directly to
|
||||||
(comma-separated) to allow the release bot to push directly to master.
|
master (release commits). Since there are no manual reviews yet,
|
||||||
|
requiring PRs for every push adds complexity without benefit.
|
||||||
"""
|
"""
|
||||||
push_whitelist = os.environ.get("DEVX_PUSH_WHITELIST", "")
|
|
||||||
whitelist = [u.strip() for u in push_whitelist.split(",") if u.strip()]
|
|
||||||
return {
|
return {
|
||||||
"branch_name": "master",
|
"branch_name": "master",
|
||||||
"enable_push": True,
|
"enable_push": True,
|
||||||
"enable_push_whitelist": True,
|
"enable_push_whitelist": False,
|
||||||
"push_whitelist_usernames": whitelist,
|
"push_whitelist_usernames": [],
|
||||||
"enable_status_check": True,
|
"enable_status_check": True,
|
||||||
"status_check_contexts": _default_status_checks(),
|
"status_check_contexts": _default_status_checks(),
|
||||||
"required_approvals": 0,
|
"required_approvals": 0,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class TestDefaultConfigs:
|
|||||||
config = _default_branch_protection_config()
|
config = _default_branch_protection_config()
|
||||||
assert config["branch_name"] == "master"
|
assert config["branch_name"] == "master"
|
||||||
assert config["enable_push"] is True
|
assert config["enable_push"] is True
|
||||||
assert config["enable_push_whitelist"] is True
|
assert config["enable_push_whitelist"] is False
|
||||||
assert config["required_approvals"] == 0
|
assert config["required_approvals"] == 0
|
||||||
assert isinstance(config["status_check_contexts"], list)
|
assert isinstance(config["status_check_contexts"], list)
|
||||||
assert "CI / quality (pull_request)" in config["status_check_contexts"]
|
assert "CI / quality (pull_request)" in config["status_check_contexts"]
|
||||||
@@ -45,16 +45,6 @@ class TestDefaultConfigs:
|
|||||||
config = _default_branch_protection_config()
|
config = _default_branch_protection_config()
|
||||||
assert config["status_check_contexts"] == ["check1", "check2", "check3"]
|
assert config["status_check_contexts"] == ["check1", "check2", "check3"]
|
||||||
|
|
||||||
def test_push_whitelist_from_env(self) -> None:
|
|
||||||
with patch.dict("os.environ", {"DEVX_PUSH_WHITELIST": "emil, alice"}):
|
|
||||||
config = _default_branch_protection_config()
|
|
||||||
assert config["push_whitelist_usernames"] == ["emil", "alice"]
|
|
||||||
|
|
||||||
def test_push_whitelist_empty_by_default(self) -> None:
|
|
||||||
with patch.dict("os.environ", {}, clear=True):
|
|
||||||
config = _default_branch_protection_config()
|
|
||||||
assert config["push_whitelist_usernames"] == []
|
|
||||||
|
|
||||||
|
|
||||||
class TestConfigureRepo:
|
class TestConfigureRepo:
|
||||||
@patch.dict("os.environ", {"REPO_TOKEN": "tok"}, clear=True)
|
@patch.dict("os.environ", {"REPO_TOKEN": "tok"}, clear=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user