diff --git a/.gitea/workflows/post-merge.yml b/.gitea/workflows/post-merge.yml index 4d61351..389948c 100644 --- a/.gitea/workflows/post-merge.yml +++ b/.gitea/workflows/post-merge.yml @@ -219,7 +219,7 @@ jobs: env: REPO_TOKEN: ${{ secrets.REPO_TOKEN }} PYTHONPATH: src - run: python3 -m devx.tools.configure_repo + run: python3 -m devx.tools.configure_repo --repo devx --owner oblachno-oss - name: Notify on failure if: failure() env: diff --git a/src/devx/ci/push_badges.py b/src/devx/ci/push_badges.py index 8bdefb7..0e56819 100644 --- a/src/devx/ci/push_badges.py +++ b/src/devx/ci/push_badges.py @@ -60,8 +60,8 @@ def fetch_latest_master(branch: str = "master") -> None: def generate_badges(output_dir: str) -> None: - """Generate badge SVG files using generate_badges.py.""" - _run([sys.executable, "scripts/generate_badges.py", "--output-dir", output_dir]) + """Generate badge SVG files using devx.tools.generate_badges.""" + _run([sys.executable, "-m", "devx.tools.generate_badges", "--output-dir", output_dir]) badges = list(Path(output_dir).glob("*.svg")) if not badges: raise click.ClickException("No badge SVG files generated") diff --git a/src/devx/gitea_cli.py b/src/devx/gitea_cli.py index 974e445..ddab09c 100644 --- a/src/devx/gitea_cli.py +++ b/src/devx/gitea_cli.py @@ -125,7 +125,7 @@ class TeaCLI: Returns: The created issue as a dict (parsed from tea JSON output). """ - args = ["issues", "create", "--title", title, "--body", body, *self._repo_arg(repo)] + args = ["issues", "create", "--title", title, "--description", body, *self._repo_arg(repo)] output = self._run(args, json_output=False) # tea issues create doesn't output JSON; extract issue number from output # Format: "Created issue #42: " diff --git a/tests/unit/test_release.py b/tests/unit/test_release.py index 906708b..4debdeb 100644 --- a/tests/unit/test_release.py +++ b/tests/unit/test_release.py @@ -283,6 +283,16 @@ class TestRunTests: with pytest.raises(click.ClickException, match="Tests failed"): run_tests() + @patch("devx.ci.release.run_cmd") + def test_tests_fail_stdout_fallback(self, mock_run_cmd: MagicMock) -> None: + """When stderr is empty, test output from stdout is used in the error message.""" + mock_run_cmd.side_effect = [ + MagicMock(returncode=0, stdout="", stderr=""), # lint passes + MagicMock(returncode=1, stdout="test failure on stdout", stderr=""), # tests fail, stderr empty + ] + with pytest.raises(click.ClickException, match="test failure on stdout"): + run_tests() + class TestMain: @patch.dict("os.environ", {})