Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e150de3c93 | ||
|
|
a0c95a035c | ||
|
|
843194b429 | ||
|
|
462171f27b | ||
|
|
18818c1bd4 | ||
|
|
d644c97dd9 | ||
|
|
0a724142ff | ||
|
|
18aa63e3e6 | ||
|
|
dd3dd48969 | ||
|
|
e66574b529 | ||
|
|
df02556132 |
No files matched your search
@@ -3,6 +3,47 @@
|
|||||||
All notable changes to CodeCraft. Versions follow [Semantic Versioning](https://semver.org/);
|
All notable changes to CodeCraft. Versions follow [Semantic Versioning](https://semver.org/);
|
||||||
until 1.0, minor versions may contain breaking changes.
|
until 1.0, minor versions may contain breaking changes.
|
||||||
|
|
||||||
|
## [v202611-00055] – 2026-11-17
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **New project from a Git repository:** the wizard no longer clones into the factory area by default
|
||||||
|
("target folder already exists" when the factory had checked out the same repository); your workspace is
|
||||||
|
preselected, and the factory area is labelled as such in the folder list.
|
||||||
|
|
||||||
|
## [v202611-00053] – 2026-11-17
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Factory versioning.** The current version is read from the tags on the forge, not from the checkout
|
||||||
|
(which kept tags that were deleted there and so counted from a stale version).
|
||||||
|
|
||||||
|
## [v202611-00054] – 2026-11-17
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **README:** new "Code factory" section explaining phases, scope, planning chats, versions and releases.
|
||||||
|
|
||||||
|
## [v202611-00052] – 2026-11-17
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Factory versioning.** Open issues of the forge were never seen (Gitea sends `"pull_request": null`), so every
|
||||||
|
deliverable counted as the last of its milestone and raised the minor version. Now only the last open issue of a
|
||||||
|
milestone raises the minor version; all others raise the patch version.
|
||||||
|
|
||||||
|
## [v202611-00051] – 2026-11-16
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Factory: close finished issues.** A finished issue has a "Close issue" button: you write a comment, it is
|
||||||
|
posted on the issue on the forge, the issue is closed there, and only then it leaves the "Done" column.
|
||||||
|
Issues that are closed on the forge by other means (or by the version pass after the merge) leave "Done" too.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- The "Done" column is now the rightmost column of the factory board.
|
||||||
|
|
||||||
## [v202611-00050] – 2026-11-16
|
## [v202611-00050] – 2026-11-16
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="Version v202611-00050" src="https://img.shields.io/badge/version-v202611--00050-d69e2e?style=flat-square">
|
<img alt="Version v202611-00055" src="https://img.shields.io/badge/version-v202611--00055-d69e2e?style=flat-square">
|
||||||
<img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-689d6a?style=flat-square">
|
<img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-689d6a?style=flat-square">
|
||||||
<img alt="Rust backend" src="https://img.shields.io/badge/backend-Rust-b7410e?style=flat-square&logo=rust">
|
<img alt="Rust backend" src="https://img.shields.io/badge/backend-Rust-b7410e?style=flat-square&logo=rust">
|
||||||
<img alt="React PWA" src="https://img.shields.io/badge/frontend-React%20PWA-2d81ff?style=flat-square&logo=react">
|
<img alt="React PWA" src="https://img.shields.io/badge/frontend-React%20PWA-2d81ff?style=flat-square&logo=react">
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
<a href="#models">Models</a> ·
|
<a href="#models">Models</a> ·
|
||||||
<a href="#terminal-client">Terminal client</a> ·
|
<a href="#terminal-client">Terminal client</a> ·
|
||||||
<a href="#automations">Automations</a> ·
|
<a href="#automations">Automations</a> ·
|
||||||
|
<a href="#code-factory">Code factory</a> ·
|
||||||
<a href="#integrations">Integrations</a> ·
|
<a href="#integrations">Integrations</a> ·
|
||||||
<a href="#users-and-security">Users</a> ·
|
<a href="#users-and-security">Users</a> ·
|
||||||
<a href="#statistics">Statistics</a> ·
|
<a href="#statistics">Statistics</a> ·
|
||||||
@@ -219,6 +220,90 @@ read and continue it.
|
|||||||
**Webhooks** start an automation from outside, e.g. on every push: the request is checked with a
|
**Webhooks** start an automation from outside, e.g. on every push: the request is checked with a
|
||||||
shared secret or a Gitea/GitHub HMAC signature, and its JSON payload is handed to the agent.
|
shared secret or a Gitea/GitHub HMAC signature, and its JSON payload is handed to the agent.
|
||||||
|
|
||||||
|
## Code factory
|
||||||
|
|
||||||
|
The factory turns issues on your Git forge (Gitea, GitHub or GitLab) into reviewed, built, accepted and
|
||||||
|
merged changes – with agents doing the work and you deciding at the points that matter. It is
|
||||||
|
the **Factory** page in the sidebar; all chats it creates live in the sidebar folder *Factory*.
|
||||||
|
|
||||||
|
```
|
||||||
|
issue + label "factory"
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
review ──► question (the agent asks in the issue; you answer, it continues)
|
||||||
|
│ └──► rejected (not buildable as written)
|
||||||
|
▼
|
||||||
|
approved ──► building ──► qa (acceptance) ──► done ──► PR merged ──► version + tag ──► closed
|
||||||
|
▲ │
|
||||||
|
└── rework ◄──┘ (up to N rounds, then failed)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Phases.** Each phase is a normal CodeCraft chat in the sandbox, so you can open and read it.
|
||||||
|
The agent's answer ends with a JSON result that the factory parses; everything else is done by
|
||||||
|
the server.
|
||||||
|
|
||||||
|
1. **Review.** An agent reads the issue and the repository and decides: *approved*, *question*
|
||||||
|
(it comments in the issue and waits for your reply) or *rejected*. It also writes acceptance
|
||||||
|
scenarios. The scenarios are stored in the factory database and are **never shown to the
|
||||||
|
builder**, so the build cannot be tuned to the test.
|
||||||
|
2. **Build.** The builder works in its own git worktree on the branch `factory/issue-<n>`.
|
||||||
|
The server – not the agent – commits, pushes (never forced) and restores the spec file.
|
||||||
|
3. **Acceptance.** A different agent checks the pushed branch in a clean checkout against the
|
||||||
|
scenarios, using the repository's `.factory/setup.json` to build and start the app. Each
|
||||||
|
scenario ends as `pass`, `fail`, `unverified` or `out_of_scope`; the verdict comes from these
|
||||||
|
results, not from the model's opinion, and a run without any pass or fail counts as failed.
|
||||||
|
On *pass* the factory opens the pull request (if none is open) and comments a result table
|
||||||
|
in the issue. On *fail* the issue goes back to the build with the findings (*rework*).
|
||||||
|
4. **Done, merge, version.** You review the pull request in the factory (diff, description) and
|
||||||
|
merge it there. The factory then pulls the merge, gives the issue its version, commits
|
||||||
|
`VERSION`, pushes an annotated tag, comments on the issue and closes it.
|
||||||
|
|
||||||
|
Issue text is treated as data, never as instructions for the factory itself.
|
||||||
|
|
||||||
|
**Scope.** An issue body can contain `Spec: <file>` and `Scope: <deliverable>` lines. Review,
|
||||||
|
build and acceptance then restrict themselves to that deliverable, so a big specification is
|
||||||
|
built in small steps instead of one huge run. Without a `Scope:` line the review picks the
|
||||||
|
first unbuilt milestone of the spec. `Prerequisite:` lines name what must be merged first.
|
||||||
|
|
||||||
|
**Planning with a model.** Three chats help you create issues, without the usual review loop:
|
||||||
|
|
||||||
|
- **Spec chat** (*New project*): works out a specification with you and creates the repository
|
||||||
|
with `docs/specs/<name>.md`, the factory setup and the first issues.
|
||||||
|
- **Plan a feature**: you describe a feature or a bug; the model asks questions and ends with a
|
||||||
|
list of issues (title, description, scope, prerequisites).
|
||||||
|
- **Cut a milestone**: the model splits a milestone of the spec into numbered deliverables
|
||||||
|
(`M2.1 – …`).
|
||||||
|
|
||||||
|
*Create issues* shows the proposal for editing and files the issues on the forge. They get the
|
||||||
|
`factory` label only if you tick *Start right away*; by default you set the label yourself,
|
||||||
|
one after the other, because later issues build on the merged earlier ones.
|
||||||
|
|
||||||
|
**Versions and releases.** Every issue that is merged raises the version of the repository
|
||||||
|
(starting from the highest `vX.Y.Z` tag): a deliverable of a milestone raises the **patch**
|
||||||
|
number (0.0.1, 0.0.2, …); the **last** open deliverable of a milestone (`M<k>.<n>`) raises the
|
||||||
|
**minor** number and resets the patch (M1 complete → 0.1.0). Issues without a milestone
|
||||||
|
(bugs, features) raise the patch number. The factory writes the `VERSION` file, pushes the tag
|
||||||
|
`vX.Y.Z` and closes the issue. The **Release** button turns the current version into a
|
||||||
|
release, e.g. 0.x → 1.0.0: it builds what the repository's `.factory/release.json` describes
|
||||||
|
(Docker image for amd64 and arm64 pushed to your registry, a source zip, extra files by glob,
|
||||||
|
shell commands), tags it and creates the release on the forge with notes from the git log and
|
||||||
|
the files attached (Gitea and GitHub).
|
||||||
|
|
||||||
|
**Settings per repository** (*Factory → Repositories*, *New repository*): forge connection and token, label
|
||||||
|
(default `factory`), parallel runs, allowed issue authors (default: the token's owner), and per
|
||||||
|
phase the model, agent (CodeCraft or Claude Code), permission mode, timeout and tries on
|
||||||
|
technical failures, plus the number of rework rounds (default 2). Failed or rejected issues
|
||||||
|
can be restarted from the board, finished ones are closed with a comment.
|
||||||
|
|
||||||
|
**Files in the repository** (all optional, kept in `.factory/`):
|
||||||
|
|
||||||
|
| File | Purpose |
|
||||||
|
|---|---|
|
||||||
|
| `setup.json` | How acceptance installs and starts the app: `install`, `start`, `url` |
|
||||||
|
| `release.json` | Recipe for releases: image, platforms, Dockerfile, build args, commands, files |
|
||||||
|
|
||||||
|
Repositories are cloned into a separate factory area, not into your workspace, and agents never see the forge API token.
|
||||||
|
|
||||||
## Integrations
|
## Integrations
|
||||||
|
|
||||||
- **Telegram:** connect your own bot (*Settings → Account → Telegram*) and use CodeCraft from
|
- **Telegram:** connect your own bot (*Settings → Account → Telegram*) and use CodeCraft from
|
||||||
|
|||||||
+31
-2
@@ -169,6 +169,7 @@ pub fn router(app: AppState) -> Router {
|
|||||||
.route("/factory/issue-chats/{id}/create", post(factory_create_issues))
|
.route("/factory/issue-chats/{id}/create", post(factory_create_issues))
|
||||||
.route("/factory/release/preview", get(factory_release_preview))
|
.route("/factory/release/preview", get(factory_release_preview))
|
||||||
.route("/factory/release", post(factory_release))
|
.route("/factory/release", post(factory_release))
|
||||||
|
.route("/factory/issues/close", post(factory_close_issue))
|
||||||
.route("/factory/issues/pr", get(factory_pr))
|
.route("/factory/issues/pr", get(factory_pr))
|
||||||
.route("/factory/issues/pr/merge", post(factory_pr_merge))
|
.route("/factory/issues/pr/merge", post(factory_pr_merge))
|
||||||
.route("/account/factory/connection/test", post(test_factory_connection))
|
.route("/account/factory/connection/test", post(test_factory_connection))
|
||||||
@@ -1829,8 +1830,13 @@ async fn list_roots(Extension(user): Extension<User>, State(app): State<AppState
|
|||||||
.user_roots(Some(&user.id))
|
.user_roots(Some(&user.id))
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|r| {
|
.map(|r| {
|
||||||
let rel = r.strip_prefix(&ws).map(|p| p.display().to_string()).unwrap_or_default();
|
let name = match r.strip_prefix(&ws) {
|
||||||
json!({"path": r, "name": if rel.is_empty() { "/".to_string() } else { rel }})
|
Ok(p) if p.as_os_str().is_empty() => "/".to_string(),
|
||||||
|
Ok(p) => p.display().to_string(),
|
||||||
|
// Outside the workspace (e.g. the factory area): show where it is, not "workspace".
|
||||||
|
Err(_) => format!("{} (factory)", r.file_name().and_then(|n| n.to_str()).unwrap_or("")).replace(" ()", ""),
|
||||||
|
};
|
||||||
|
json!({"path": r, "name": name})
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
Json(json!(roots))
|
Json(json!(roots))
|
||||||
@@ -2752,6 +2758,29 @@ async fn factory_create_issues(Extension(user): Extension<User>, State(app): Sta
|
|||||||
Ok(Json(json!({"created": created})))
|
Ok(Json(json!({"created": created})))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize)]
|
||||||
|
struct CloseIssue {
|
||||||
|
repo: String,
|
||||||
|
number: i64,
|
||||||
|
#[serde(default)]
|
||||||
|
comment: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Close a finished issue: a comment, then the issue on the forge; only then it leaves "done".
|
||||||
|
async fn factory_close_issue(Extension(user): Extension<User>, State(app): State<AppState>, headers: axum::http::HeaderMap, Json(b): Json<CloseIssue>) -> ApiResult {
|
||||||
|
let (g, row) = factory_issue_forge(&app, &user, &b.repo, b.number)?;
|
||||||
|
if row["state"].as_str() != Some("done") {
|
||||||
|
return Err(ApiError(StatusCode::BAD_REQUEST, "only finished issues can be closed here".into()));
|
||||||
|
}
|
||||||
|
let bad = |e: anyhow::Error| ApiError(StatusCode::BAD_GATEWAY, format!("{e:#}"));
|
||||||
|
let text = if b.comment.trim().is_empty() { "Closed.".to_string() } else { b.comment.trim().to_string() };
|
||||||
|
g.comment(b.number as u64, &format!("{}\n**Closed** by {}: {text}", crate::factory::BOT, user.username)).await.map_err(bad)?;
|
||||||
|
g.close_issue(b.number as u64).await.map_err(bad)?;
|
||||||
|
app.store.factory_issue_set(&b.repo, b.number, &[("state", json!("closed"))])?;
|
||||||
|
app.audit(Some(&user), "factory.issue.close", &format!("{}#{}", b.repo, b.number), &crate::auth::client_ip(&headers));
|
||||||
|
Ok(Json(json!({"ok": true})))
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct PrQuery {
|
struct PrQuery {
|
||||||
repo: String,
|
repo: String,
|
||||||
|
|||||||
+16
-2
@@ -540,7 +540,7 @@ impl Forge {
|
|||||||
let a = v.as_array().cloned().unwrap_or_default();
|
let a = v.as_array().cloned().unwrap_or_default();
|
||||||
let n = a.len();
|
let n = a.len();
|
||||||
for i in a {
|
for i in a {
|
||||||
if i.get("pull_request").is_some() {
|
if !i.get("pull_request").map_or(true, |p| p.is_null()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
out.push((i[key].as_i64().unwrap_or(0), i["title"].as_str().unwrap_or("").to_string()));
|
out.push((i[key].as_i64().unwrap_or(0), i["title"].as_str().unwrap_or("").to_string()));
|
||||||
@@ -552,6 +552,12 @@ impl Forge {
|
|||||||
Ok(out)
|
Ok(out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Is the issue still open on the forge?
|
||||||
|
pub async fn issue_is_open(&self, number: u64) -> Result<bool> {
|
||||||
|
let v = self.call(reqwest::Method::GET, self.rp(&format!("/issues/{number}")), None).await?;
|
||||||
|
Ok(!matches!(v["state"].as_str(), Some("closed")))
|
||||||
|
}
|
||||||
|
|
||||||
pub async fn close_issue(&self, number: u64) -> Result<()> {
|
pub async fn close_issue(&self, number: u64) -> Result<()> {
|
||||||
match self.kind {
|
match self.kind {
|
||||||
Kind::Gitlab => self.call(reqwest::Method::PUT, self.rp(&format!("/issues/{number}")), Some(json!({"state_event": "close"}))).await.map(|_| ()),
|
Kind::Gitlab => self.call(reqwest::Method::PUT, self.rp(&format!("/issues/{number}")), Some(json!({"state_event": "close"}))).await.map(|_| ()),
|
||||||
@@ -730,7 +736,7 @@ fn urlenc(s: &str) -> String {
|
|||||||
// --- engine -----------------------------------------------------------------------
|
// --- engine -----------------------------------------------------------------------
|
||||||
|
|
||||||
/// The marker with which every bot comment starts (the poller ignores these when it looks for answers).
|
/// The marker with which every bot comment starts (the poller ignores these when it looks for answers).
|
||||||
const BOT: &str = "<!-- codecraft-factory -->";
|
pub(crate) const BOT: &str = "<!-- codecraft-factory -->";
|
||||||
|
|
||||||
/// Machine-readable result at the end of a phase: the last fenced ```json block, else the last
|
/// Machine-readable result at the end of a phase: the last fenced ```json block, else the last
|
||||||
/// top-level object in the text. Needs a "decision" field.
|
/// top-level object in the text. Needs a "decision" field.
|
||||||
@@ -1334,6 +1340,14 @@ pub async fn poll_repo(app: &Arc<App>, user: &User, cfg: &RepoCfg) -> Result<()>
|
|||||||
app.store.factory_issue_set(&cfg.url, n, &[("title", json!(title)), ("state", json!("review"))])?;
|
app.store.factory_issue_set(&cfg.url, n, &[("title", json!(title)), ("state", json!("review"))])?;
|
||||||
tokio::spawn(review(app.clone(), user.clone(), cfg.clone(), issue, comments));
|
tokio::spawn(review(app.clone(), user.clone(), cfg.clone(), issue, comments));
|
||||||
}
|
}
|
||||||
|
// Accepted issues that were closed on the forge (by hand or by the factory) leave the "done" column.
|
||||||
|
let open: Vec<i64> = g.issues(&cfg.label).await.unwrap_or_default().iter().map(issue_no).collect();
|
||||||
|
for row in app.store.factory_issues(&user.id)?.into_iter().filter(|r| r["repo"].as_str() == Some(cfg.url.as_str()) && r["state"].as_str() == Some("done")) {
|
||||||
|
let n = issue_no(&row);
|
||||||
|
if !open.contains(&n) && !g.issue_is_open(n as u64).await.unwrap_or(true) {
|
||||||
|
app.store.factory_issue_set(&cfg.url, n, &[("state", json!("closed"))])?;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Merged issues get their version and tag.
|
// Merged issues get their version and tag.
|
||||||
if let Err(e) = crate::factory_version::version_pass(app, user, cfg).await {
|
if let Err(e) = crate::factory_version::version_pass(app, user, cfg).await {
|
||||||
tracing::warn!("factory {}: versions: {e:#}", cfg.url);
|
tracing::warn!("factory {}: versions: {e:#}", cfg.url);
|
||||||
|
|||||||
@@ -80,8 +80,16 @@ pub fn next_version(cur: Ver, b: Bump) -> Ver {
|
|||||||
|
|
||||||
/// Highest `vX.Y.Z` tag of the remote (0.0.0 when there is none).
|
/// Highest `vX.Y.Z` tag of the remote (0.0.0 when there is none).
|
||||||
async fn tags_version(cfg: &RepoCfg, dir: &Path) -> Ver {
|
async fn tags_version(cfg: &RepoCfg, dir: &Path) -> Ver {
|
||||||
let _ = git(cfg, dir, &["fetch", "--tags", "--force", "origin"]).await;
|
// The remote is the truth: a local checkout keeps tags that were deleted on the forge.
|
||||||
git(cfg, dir, &["tag", "-l", "v[0-9]*"]).await.unwrap_or_default().lines().filter_map(parse_version).max().unwrap_or((0, 0, 0))
|
let remote = git(cfg, dir, &["ls-remote", "--tags", "--refs", "origin", "v[0-9]*"]).await;
|
||||||
|
let names: Vec<String> = match remote {
|
||||||
|
Ok(out) => out.lines().filter_map(|l| l.split("refs/tags/").nth(1)).map(str::to_string).collect(),
|
||||||
|
Err(_) => {
|
||||||
|
let _ = git(cfg, dir, &["fetch", "--tags", "--force", "origin"]).await;
|
||||||
|
git(cfg, dir, &["tag", "-l", "v[0-9]*"]).await.unwrap_or_default().lines().map(str::to_string).collect()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
names.iter().filter_map(|t| parse_version(t)).max().unwrap_or((0, 0, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `git pull --ff-only` of the default branch in the main checkout, so everything that was merged
|
/// `git pull --ff-only` of the default branch in the main checkout, so everything that was merged
|
||||||
@@ -195,11 +203,11 @@ fn pr_number(url: &str) -> u64 {
|
|||||||
pub async fn version_pass(app: &Arc<App>, user: &User, cfg: &RepoCfg) -> Result<()> {
|
pub async fn version_pass(app: &Arc<App>, user: &User, cfg: &RepoCfg) -> Result<()> {
|
||||||
let Some(_guard) = busy(&cfg.url) else { return Ok(()) };
|
let Some(_guard) = busy(&cfg.url) else { return Ok(()) };
|
||||||
let rows: Vec<Value> = app.store.factory_issues(&user.id)?.into_iter().filter(|r| r["repo"].as_str() == Some(cfg.url.as_str())).collect();
|
let rows: Vec<Value> = app.store.factory_issues(&user.id)?.into_iter().filter(|r| r["repo"].as_str() == Some(cfg.url.as_str())).collect();
|
||||||
let pending = |r: &&Value| r["state"].as_str() == Some("done") && r["version"].as_str() == Some("");
|
let pending = |r: &&Value| matches!(r["state"].as_str(), Some("done") | Some("closed")) && r["version"].as_str() == Some("") && !r["pr_url"].as_str().unwrap_or("").is_empty();
|
||||||
if app.store.factory_version(&cfg.url)?.is_none() {
|
if app.store.factory_version(&cfg.url)?.is_none() {
|
||||||
let dir = checkout(app, user, cfg).await?;
|
let dir = checkout(app, user, cfg).await?;
|
||||||
let cur = tags_version(cfg, &dir).await;
|
let cur = tags_version(cfg, &dir).await;
|
||||||
for r in rows.iter().filter(pending) {
|
for r in rows.iter().filter(|r| matches!(r["state"].as_str(), Some("done") | Some("closed")) && r["version"].as_str() == Some("")) {
|
||||||
app.store.factory_issue_set(&cfg.url, issue_no(r), &[("version", json!("-"))])?;
|
app.store.factory_issue_set(&cfg.url, issue_no(r), &[("version", json!("-"))])?;
|
||||||
}
|
}
|
||||||
app.store.factory_version_set(&cfg.url, &fmt(cur))?;
|
app.store.factory_version_set(&cfg.url, &fmt(cur))?;
|
||||||
@@ -251,7 +259,7 @@ pub async fn version_pass(app: &Arc<App>, user: &User, cfg: &RepoCfg) -> Result<
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
let _ = checkout(app, user, cfg).await; // pulls the merge and the VERSION commit
|
let _ = checkout(app, user, cfg).await; // pulls the merge and the VERSION commit
|
||||||
app.store.factory_issue_set(&cfg.url, n, &[("version", json!(new.clone()))])?;
|
app.store.factory_issue_set(&cfg.url, n, &[("version", json!(new.clone())), ("state", json!("closed"))])?;
|
||||||
app.store.factory_version_set(&cfg.url, &new)?;
|
app.store.factory_version_set(&cfg.url, &new)?;
|
||||||
let _ = g.close_issue(n as u64).await;
|
let _ = g.close_issue(n as u64).await;
|
||||||
let why = if bump == Bump::Minor && milestone_of(&title).is_some() { " – the milestone is complete" } else { "" };
|
let why = if bump == Bump::Minor && milestone_of(&title).is_some() { " – the milestone is complete" } else { "" };
|
||||||
|
|||||||
@@ -118,8 +118,8 @@ const COLUMNS: { id: string; states: string[] }[] = [
|
|||||||
{ id: "approved", states: ["approved"] },
|
{ id: "approved", states: ["approved"] },
|
||||||
{ id: "build", states: ["building", "rework"] },
|
{ id: "build", states: ["building", "rework"] },
|
||||||
{ id: "qa", states: ["qa", "testing"] },
|
{ id: "qa", states: ["qa", "testing"] },
|
||||||
{ id: "done", states: ["done"] },
|
|
||||||
{ id: "failed", states: ["failed", "rejected"] },
|
{ id: "failed", states: ["failed", "rejected"] },
|
||||||
|
{ id: "done", states: ["done"] },
|
||||||
];
|
];
|
||||||
|
|
||||||
const KIND_NAME: Record<string, string> = { gitea: "Gitea", github: "GitHub", gitlab: "GitLab" };
|
const KIND_NAME: Record<string, string> = { gitea: "Gitea", github: "GitHub", gitlab: "GitLab" };
|
||||||
@@ -324,6 +324,22 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
|
|||||||
setBusy(false);
|
setBusy(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const closeIssue = async () => {
|
||||||
|
if (!selected) return;
|
||||||
|
const comment = await promptDialog({ title: t("factory.closeTitle"), message: t("factory.closeMsg", { n: selected.number }), defaultValue: t("factory.closeDefault"), confirmLabel: t("factory.close") });
|
||||||
|
if (comment === null) return;
|
||||||
|
setBusy(true);
|
||||||
|
try {
|
||||||
|
await post("/factory/issues/close", { repo: selected.repo, number: selected.number, comment });
|
||||||
|
toast(t("factory.closed"), "success");
|
||||||
|
setSel("");
|
||||||
|
await reload();
|
||||||
|
} catch (e: any) {
|
||||||
|
toast(e.message);
|
||||||
|
} finally {
|
||||||
|
setBusy(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
const phaseRunning = !!selected && ["review", "building", "testing"].includes(selected.state);
|
const phaseRunning = !!selected && ["review", "building", "testing"].includes(selected.state);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -452,6 +468,11 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
|
|||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{selected && selected.state === "done" && (
|
||||||
|
<button className="small" onClick={closeIssue} disabled={busy}>
|
||||||
|
<Icon name="check" /> {t("factory.close")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
{selected && (
|
{selected && (
|
||||||
<>
|
<>
|
||||||
<a className="small ghost button-link" href={issueUrl(selected.repo, selected.number)} target="_blank" rel="noreferrer">
|
<a className="small ghost button-link" href={issueUrl(selected.repo, selected.number)} target="_blank" rel="noreferrer">
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ export function NewSession({ onMenu, onCreated }: { onMenu: () => void; onCreate
|
|||||||
if (!model && config?.default_model) setModel(config.default_model);
|
if (!model && config?.default_model) setModel(config.default_model);
|
||||||
}, [config, model]);
|
}, [config, model]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!rootPath && roots.length) setRootPath(roots[roots.length - 1].path);
|
if (!rootPath && roots.length) setRootPath(roots[0].path);
|
||||||
}, [roots, rootPath]);
|
}, [roots, rootPath]);
|
||||||
// Old software is analysed in deep mode; websites default to clean room.
|
// Old software is analysed in deep mode; websites default to clean room.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -1261,6 +1261,11 @@ export const de: Messages = {
|
|||||||
"release.state.running": "läuft",
|
"release.state.running": "läuft",
|
||||||
"release.state.done": "fertig",
|
"release.state.done": "fertig",
|
||||||
"release.state.failed": "fehlgeschlagen",
|
"release.state.failed": "fehlgeschlagen",
|
||||||
|
"factory.close": "Issue schließen",
|
||||||
|
"factory.closeTitle": "Issue schließen",
|
||||||
|
"factory.closeMsg": "Kommentar zum Schließen von Issue #{n}. Er wird im Issue veröffentlicht, danach wird das Issue geschlossen.",
|
||||||
|
"factory.closeDefault": "Erledigt und abgenommen.",
|
||||||
|
"factory.closed": "Issue geschlossen",
|
||||||
"factory.pr": "Pull Request",
|
"factory.pr": "Pull Request",
|
||||||
"factory.round": "Runde {n}",
|
"factory.round": "Runde {n}",
|
||||||
"factory.openChat": "Chat öffnen",
|
"factory.openChat": "Chat öffnen",
|
||||||
|
|||||||
@@ -1260,6 +1260,11 @@ export const en = {
|
|||||||
"release.state.running": "running",
|
"release.state.running": "running",
|
||||||
"release.state.done": "done",
|
"release.state.done": "done",
|
||||||
"release.state.failed": "failed",
|
"release.state.failed": "failed",
|
||||||
|
"factory.close": "Close issue",
|
||||||
|
"factory.closeTitle": "Close issue",
|
||||||
|
"factory.closeMsg": "Comment for closing issue #{n}. It is posted on the issue, then the issue is closed.",
|
||||||
|
"factory.closeDefault": "Done and accepted.",
|
||||||
|
"factory.closed": "Issue closed",
|
||||||
"factory.pr": "Pull request",
|
"factory.pr": "Pull request",
|
||||||
"factory.round": "round {n}",
|
"factory.round": "round {n}",
|
||||||
"factory.openChat": "Open chat",
|
"factory.openChat": "Open chat",
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
* under "unreleased"; scripts/release.sh renames the key to the release version.
|
* under "unreleased"; scripts/release.sh renames the key to the release version.
|
||||||
*/
|
*/
|
||||||
export const WHATS_NEW: Record<string, { en: string[]; de: string[] }> = {
|
export const WHATS_NEW: Record<string, { en: string[]; de: string[] }> = {
|
||||||
|
"202611-00055": {
|
||||||
|
en: ["Fixed: cloning a repository for a new project no longer ends up in the factory area"],
|
||||||
|
de: ["Behoben: Klonen eines Repositorys für ein neues Projekt landet nicht mehr in der Factory-Ablage"],
|
||||||
|
},
|
||||||
|
"202611-00054": {
|
||||||
|
en: ["README: new section explaining the code factory"],
|
||||||
|
de: ["README: neuer Abschnitt zur Code-Factory"],
|
||||||
|
},
|
||||||
|
"202611-00053": {
|
||||||
|
en: ["Factory: the current version is read from the tags on the forge"],
|
||||||
|
de: ["Factory: die aktuelle Version wird aus den Tags im Forge gelesen"],
|
||||||
|
},
|
||||||
|
"202611-00052": {
|
||||||
|
en: ["Factory: fixed versioning – deliverables raise the patch version, only the last one of a milestone raises the minor version"],
|
||||||
|
de: ["Factory: Versionierung korrigiert – Deliverables erhöhen die Patch-Version, nur das letzte eines Meilensteins die Minor-Version"],
|
||||||
|
},
|
||||||
|
"202611-00051": {
|
||||||
|
en: ["Factory: close finished issues with a comment; the Done column moved to the right"],
|
||||||
|
de: ["Factory: fertige Issues mit Kommentar schließen; die Spalte Fertig steht jetzt ganz rechts"],
|
||||||
|
},
|
||||||
"202611-00049": {
|
"202611-00049": {
|
||||||
en: ["Factory: every merged issue gets a version and a git tag (patch per issue, minor per finished milestone)", "Factory: start a release with Docker image (amd64 + arm64), downloads and a release on the forge", "Factory: set the number of rework rounds and tries per phase"],
|
en: ["Factory: every merged issue gets a version and a git tag (patch per issue, minor per finished milestone)", "Factory: start a release with Docker image (amd64 + arm64), downloads and a release on the forge", "Factory: set the number of rework rounds and tries per phase"],
|
||||||
de: ["Factory: jedes gemergte Issue bekommt eine Version und einen Git-Tag (Patch je Issue, Minor je abgeschlossenem Meilenstein)", "Factory: Release mit Docker-Image (amd64 + arm64), Downloads und Release auf der Forge anstoßen", "Factory: Anzahl der Nachbesserungsrunden und Versuche je Phase einstellbar"],
|
de: ["Factory: jedes gemergte Issue bekommt eine Version und einen Git-Tag (Patch je Issue, Minor je abgeschlossenem Meilenstein)", "Factory: Release mit Docker-Image (amd64 + arm64), Downloads und Release auf der Forge anstoßen", "Factory: Anzahl der Nachbesserungsrunden und Versuche je Phase einstellbar"],
|
||||||
|
|||||||
Reference in new issue
Block a user