diff --git a/AGENTS.md b/AGENTS.md index 7d4dbd9..cfed77d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -162,7 +162,7 @@ the PR. Then add the `ready-to-merge` label. The auto-merge workflow will: 1. **Validate** PR title format (`DEVX-N: `) and match against Vikunja task title 2. **Check** that at least one substantive APPROVE review exists 3. Wait for all CI checks to pass (including the `pr-review` job) -4. Squash-merge with title: `DEVX-N ` (space-separated, no colon after DEVX-N) +4. Squash-merge with title: `DEVX-N: ` 5. The post-merge workflow marks the Vikunja task as done 6. The release workflow automatically versions, tags, and publishes @@ -259,7 +259,7 @@ by `python -m devx.tools.install_tools` and configured by ### git-cliff Commit Preprocessing -Merge commits on master have the format `DEVX-N `. The +Merge commits on master have the format `DEVX-N: `. The `cliff.toml` includes a `commit_preprocessors` entry that strips the `DEVX-N ` prefix before parsing. This ensures all merged work appears in the changelog. @@ -282,7 +282,7 @@ setuptools via `dynamic = ["version"]` in `pyproject.toml`. | Branch name | `DEVX-N-short-description` | `DEVX-12-add-release-script` | | Branch commits | `` | `feat: add release script` | | PR title | `DEVX-N: ` | `DEVX-12: Add release automation` | -| Merge commit | `DEVX-N ` | `DEVX-12 feat: add release script` | +| Merge commit | `DEVX-N: ` | `DEVX-12: feat: add release script` | ### Task ID Resolution diff --git a/src/devx/ci/auto_merge.py b/src/devx/ci/auto_merge.py index 893a7fc..1ecc218 100644 --- a/src/devx/ci/auto_merge.py +++ b/src/devx/ci/auto_merge.py @@ -226,12 +226,12 @@ def main(branch: str, pr_title: str, repo: str, pr_number: str) -> None: validate_pr_title(pr_title, task_id) validate_pr_title_matches_vikunja(pr_title, task_id) - # Build merge title: DEVX-N (space-separated, no colon) + # Build merge title: DEVX-N: commits = client.get_pr_commits(pr_num) conv_msg = extract_conventional_msg(commits) if not conv_msg: raise click.ClickException(_("Could not extract conventional commit message from PR commits.")) - merge_title = f"{task_id} {conv_msg}" + merge_title = f"{task_id}: {conv_msg}" try: client.merge_pr(pr_num, merge_title) diff --git a/tests/unit/test_auto_merge.py b/tests/unit/test_auto_merge.py index 860887a..0e7a71d 100644 --- a/tests/unit/test_auto_merge.py +++ b/tests/unit/test_auto_merge.py @@ -221,7 +221,7 @@ class TestMain: ["DEVX-19-fix-bug", "DEVX-19: Fix timeout", "owner/repo", "7"], ) assert result.exit_code == 0, result.output - mock_client.merge_pr.assert_called_once_with(7, "DEVX-19 fix: resolve timeout") + mock_client.merge_pr.assert_called_once_with(7, "DEVX-19: fix: resolve timeout") @patch.dict("os.environ", {"REPO_TOKEN": ""}, clear=True) def test_no_token_raises(self) -> None: