Public Access
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05de2b0aa9 | ||
|
|
6a463a93d2 | ||
|
|
ad7b52c368 |
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.36.2] - 2026-07-07
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- GiteaClient.set_repo_variable uses PUT instead of PATCH
|
||||
|
||||
## [0.36.1] - 2026-07-07
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -16,12 +16,12 @@ quality badges.
|
||||
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/src/branch/master/LICENSE)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
|
||||
[](https://www.python.org/downloads/)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
|
||||
[](https://www.python.org/downloads/)
|
||||
|
||||
## Why devx?
|
||||
|
||||
@@ -87,7 +87,7 @@ extra index and list devx in your dependencies:
|
||||
```toml
|
||||
[project]
|
||||
dependencies = [
|
||||
"devx>=0.36.1",
|
||||
"devx>=0.36.2",
|
||||
]
|
||||
|
||||
[tool.pip]
|
||||
@@ -101,8 +101,8 @@ pip install -e .
|
||||
```
|
||||
|
||||
> **Note:** If your project requires a specific devx version, pin it in
|
||||
> `dependencies` (for example, `"devx==0.36.1"`) or use a version constraint
|
||||
> (for example, `"devx>=0.36.1,<0.37"`).
|
||||
> `dependencies` (for example, `"devx==0.36.2"`) or use a version constraint
|
||||
> (for example, `"devx>=0.36.2,<0.37"`).
|
||||
|
||||
### Optional extras
|
||||
|
||||
|
||||
+8
-8
@@ -12,12 +12,12 @@ project to be reusable across all oblachno-oss repositories.
|
||||
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/src/branch/master/LICENSE)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
|
||||
[](https://www.python.org/downloads/)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
|
||||
[](https://www.python.org/downloads/)
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -74,14 +74,14 @@ Add devx to your `pyproject.toml` dependencies and configure the registry:
|
||||
```toml
|
||||
[project]
|
||||
dependencies = [
|
||||
"devx>=0.36.1",
|
||||
"devx>=0.36.2",
|
||||
]
|
||||
|
||||
[tool.pip]
|
||||
extra-index-url = "https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple"
|
||||
```
|
||||
|
||||
Pin a specific version if needed: `"devx==0.36.1"` or `"devx>=0.36.1,<0.37"`.
|
||||
Pin a specific version if needed: `"devx==0.36.2"` or `"devx>=0.36.2,<0.37"`.
|
||||
|
||||
### Optional extras
|
||||
|
||||
|
||||
@@ -48,12 +48,12 @@ Add devx to your `pyproject.toml`:
|
||||
```toml
|
||||
[project]
|
||||
dependencies = [
|
||||
"devx>=0.36.1",
|
||||
"devx>=0.36.2",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"devx>=0.36.1",
|
||||
"devx>=0.36.2",
|
||||
]
|
||||
```
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"""devx — reusable development and CI/CD tools for oblachno-oss projects."""
|
||||
|
||||
__version__ = "0.36.1"
|
||||
__version__ = "0.36.2"
|
||||
|
||||
@@ -391,15 +391,16 @@ class GiteaClient:
|
||||
def set_repo_variable(self, name: str, value: str) -> None:
|
||||
"""Create or update a Gitea Actions repository variable (idempotent).
|
||||
|
||||
Tries PATCH first; if the variable doesn't exist (404), creates it
|
||||
via POST.
|
||||
Tries PUT first (update); if the variable doesn't exist (404),
|
||||
creates it via POST. Gitea 1.26.x does not support PATCH for
|
||||
action variables.
|
||||
"""
|
||||
try:
|
||||
self._request("PATCH", f"/actions/variables/{name}", json={"value": value})
|
||||
self._request("PUT", f"/actions/variables/{name}", json={"value": value})
|
||||
except APIError as e:
|
||||
if e.status != 404:
|
||||
raise
|
||||
self._request("POST", "/actions/variables", json={"name": name, "value": value})
|
||||
self._request("POST", f"/actions/variables/{name}", json={"value": value})
|
||||
|
||||
|
||||
class VikunjaClient:
|
||||
|
||||
@@ -944,7 +944,7 @@ class TestGiteaClientActions:
|
||||
client._session.request = MagicMock(return_value=_mock_response({}))
|
||||
client.set_repo_variable("PRODUCTION_DEPLOY_TAG", "v0.28.2")
|
||||
client._session.request.assert_called_once_with(
|
||||
"PATCH",
|
||||
"PUT",
|
||||
"https://git.example.com/repos/owner/repo/actions/variables/PRODUCTION_DEPLOY_TAG",
|
||||
timeout=DEFAULT_TIMEOUT,
|
||||
json={"value": "v0.28.2"},
|
||||
@@ -960,8 +960,8 @@ class TestGiteaClientActions:
|
||||
assert client._session.request.call_count == 2
|
||||
second_call = client._session.request.call_args_list[1]
|
||||
assert second_call.args[0] == "POST"
|
||||
assert second_call.args[1] == "https://git.example.com/repos/owner/repo/actions/variables"
|
||||
assert second_call.kwargs["json"] == {"name": "NEW_VAR", "value": "v0.29.0"}
|
||||
assert second_call.args[1] == "https://git.example.com/repos/owner/repo/actions/variables/NEW_VAR"
|
||||
assert second_call.kwargs["json"] == {"value": "v0.29.0"}
|
||||
|
||||
def test_set_repo_variable_reraises_non_404(self) -> None:
|
||||
client = GiteaClient("https://git.example.com", "tok", "owner", "repo")
|
||||
|
||||
Reference in New Issue
Block a user