ace-git 0.27.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/docs/usage.md +13 -1
- data/lib/ace/git/cli/commands/pr.rb +35 -2
- data/lib/ace/git/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a04e2b991b72c03f9af0851e5711166bcec92951a56854e43b6e5626899e187f
|
|
4
|
+
data.tar.gz: cc1f74fa8cbce7147362c5061f34aeec2e175d99ca9d81476edc14e2be786892
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3786c335ec374eec39be2e754c1525882dacbaf0ca88f22d42419f15c2284cd45ff3d1f5fd4f59e9dc86597451aeb967a85c6d4f0aede71009253ab42eb82b8
|
|
7
|
+
data.tar.gz: b49568593c0725d5df0c726b3ecfef68cba8c9e0a57fd7fdd9d29cbec8c27132e331192d407efe507b2d5c04abf793a71bf81d43945d67401b958375906202d3
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.28.1] - 2026-10-04
|
|
11
|
+
|
|
12
|
+
### Technical
|
|
13
|
+
|
|
14
|
+
- Verify the public PR lifecycle preserves provider uncertainty after accepted mutations.
|
|
15
|
+
|
|
16
|
+
## [0.28.0] - 2026-10-04
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- PR receipts include merge-commit proof and `pr` JSON failures carry the classified error category on stdout (parseable non-success; text and nonzero exit unchanged).
|
|
20
|
+
|
|
10
21
|
## [0.27.0] - 2026-10-03
|
|
11
22
|
|
|
12
23
|
### Added
|
data/docs/usage.md
CHANGED
|
@@ -199,6 +199,18 @@ ace-git pr merge 25 --expected-head SHA --method squash
|
|
|
199
199
|
- A create request whose outcome is unknown (transport failure after send)
|
|
200
200
|
reports an unknown outcome with the exact identity to reconcile; it never
|
|
201
201
|
retries automatically.
|
|
202
|
+
- With `--format json`, a failed operation prints the classified error as
|
|
203
|
+
JSON on stdout (`{"error": {"category": ..., "message": ...}}` — e.g.
|
|
204
|
+
`expected_head_conflict`, `unsupported_capability`, `unknown_outcome`)
|
|
205
|
+
before the nonzero exit; text mode explains the same failure on stderr.
|
|
206
|
+
|
|
207
|
+
Provider notes (Forgejo): the delivery lifecycle rides the repository-bound
|
|
208
|
+
Forgejo API v1 and requires Forgejo >= 8.0 (probed before mutations; the
|
|
209
|
+
provider refuses below the documented capability floor). Drafts use the
|
|
210
|
+
forge's WIP-title convention (`draft: true` creates a `WIP:`-prefixed
|
|
211
|
+
title; `pr ready` strips it and proves the ready state by read-back).
|
|
212
|
+
Same-server fork sources are supported via the declared `--head-repo`
|
|
213
|
+
URL; cross-host sources refuse before any mutation.
|
|
202
214
|
|
|
203
215
|
### `ace-git version`
|
|
204
216
|
|
|
@@ -290,7 +302,7 @@ Both providers implement the same issue-tracking contract (issue lookup, comment
|
|
|
290
302
|
create/update/delete, label add/remove, state transitions) so task issue
|
|
291
303
|
synchronization stays forge-neutral; `ace-task` owns the sync orchestration.
|
|
292
304
|
|
|
293
|
-
Configure servers in `.ace/git.yml`
|
|
305
|
+
Configure servers in `.ace/git/config.yml` under `git.servers`, then
|
|
294
306
|
resolve them by name, by default, or from a git remote URL. Every failure path is
|
|
295
307
|
classified (missing CLI, unauthenticated, unreachable, malformed output, object
|
|
296
308
|
not found) with no silent fallbacks.
|
|
@@ -13,7 +13,9 @@ module Ace
|
|
|
13
13
|
# (mutually exclusive; remote resolution when neither is given) and
|
|
14
14
|
# `--format json`. Success output carries the resolved server,
|
|
15
15
|
# provider, and exact PR identity; failures exit nonzero with the
|
|
16
|
-
# classified provider error and never claim success.
|
|
16
|
+
# classified provider error and never claim success. JSON failures
|
|
17
|
+
# put the error category and message on stdout so machine callers
|
|
18
|
+
# can parse the classification; text goes to stderr via the runner.
|
|
17
19
|
module Pr
|
|
18
20
|
# Shared plumbing for all pr subcommands.
|
|
19
21
|
class BaseCommand < Ace::Support::Cli::Command
|
|
@@ -24,6 +26,19 @@ module Ace
|
|
|
24
26
|
option :remote, type: :string, desc: "Git remote used for server resolution when nothing is selected"
|
|
25
27
|
option :format, type: :string, default: "text", desc: "Output format: text, json"
|
|
26
28
|
|
|
29
|
+
ERROR_CATEGORIES = {
|
|
30
|
+
"ProviderAuthenticationError" => "authentication",
|
|
31
|
+
"ProviderUnreachableError" => "unreachable",
|
|
32
|
+
"ProviderMalformedOutputError" => "malformed",
|
|
33
|
+
"ProviderObjectNotFoundError" => "not_found",
|
|
34
|
+
"ProviderCliMissingError" => "cli_missing",
|
|
35
|
+
"ProviderIdentityMismatchError" => "identity_mismatch",
|
|
36
|
+
"ProviderConflictingMatchesError" => "conflicting_matches",
|
|
37
|
+
"ProviderExpectedHeadConflictError" => "expected_head_conflict",
|
|
38
|
+
"ProviderUnsupportedCapabilityError" => "unsupported_capability",
|
|
39
|
+
"ProviderUnknownOutcomeError" => "unknown_outcome"
|
|
40
|
+
}.freeze
|
|
41
|
+
|
|
27
42
|
private
|
|
28
43
|
|
|
29
44
|
def lifecycle(options)
|
|
@@ -47,6 +62,18 @@ module Ace
|
|
|
47
62
|
end
|
|
48
63
|
end
|
|
49
64
|
|
|
65
|
+
# JSON mode keeps the classified failure parseable on stdout;
|
|
66
|
+
# the human-readable line still reaches stderr through the
|
|
67
|
+
# raised Cli::Error with a nonzero exit.
|
|
68
|
+
def render_failure(options, error)
|
|
69
|
+
return unless options[:format] == "json"
|
|
70
|
+
|
|
71
|
+
puts JSON.pretty_generate(
|
|
72
|
+
error: {category: ERROR_CATEGORIES.fetch(error.class.name.split("::").last, "error"),
|
|
73
|
+
message: error.message}
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
50
77
|
def format_value(value)
|
|
51
78
|
case value
|
|
52
79
|
when Hash
|
|
@@ -73,7 +100,8 @@ module Ace
|
|
|
73
100
|
head_ref: pr.head_ref,
|
|
74
101
|
head_repository: pr.head_repository_url,
|
|
75
102
|
base_ref: pr.base_ref,
|
|
76
|
-
base_repository: pr.base_repository_url
|
|
103
|
+
base_repository: pr.base_repository_url,
|
|
104
|
+
merge_commit: pr.merge_commit_sha
|
|
77
105
|
)
|
|
78
106
|
end
|
|
79
107
|
end
|
|
@@ -103,6 +131,7 @@ module Ace
|
|
|
103
131
|
merge_commit: pr.merge_commit_sha
|
|
104
132
|
)
|
|
105
133
|
rescue Ace::Git::Error, ArgumentError => e
|
|
134
|
+
render_failure(options, e)
|
|
106
135
|
raise Ace::Support::Cli::Error.new(e.message)
|
|
107
136
|
end
|
|
108
137
|
end
|
|
@@ -131,6 +160,7 @@ module Ace
|
|
|
131
160
|
)
|
|
132
161
|
emit_receipt(options, "created", receipt)
|
|
133
162
|
rescue Ace::Git::Error, ArgumentError => e
|
|
163
|
+
render_failure(options, e)
|
|
134
164
|
raise Ace::Support::Cli::Error.new(e.message)
|
|
135
165
|
end
|
|
136
166
|
end
|
|
@@ -153,6 +183,7 @@ module Ace
|
|
|
153
183
|
)
|
|
154
184
|
emit_receipt(options, "updated", receipt)
|
|
155
185
|
rescue Ace::Git::Error, ArgumentError => e
|
|
186
|
+
render_failure(options, e)
|
|
156
187
|
raise Ace::Support::Cli::Error.new(e.message)
|
|
157
188
|
end
|
|
158
189
|
end
|
|
@@ -168,6 +199,7 @@ module Ace
|
|
|
168
199
|
receipt = lifecycle(options).ready(identifier, expected_head: expected_head)
|
|
169
200
|
emit_receipt(options, "readied", receipt)
|
|
170
201
|
rescue Ace::Git::Error, ArgumentError => e
|
|
202
|
+
render_failure(options, e)
|
|
171
203
|
raise Ace::Support::Cli::Error.new(e.message)
|
|
172
204
|
end
|
|
173
205
|
end
|
|
@@ -184,6 +216,7 @@ module Ace
|
|
|
184
216
|
receipt = lifecycle(options).merge(identifier, expected_head: expected_head, method: method)
|
|
185
217
|
emit_receipt(options, "merged", receipt)
|
|
186
218
|
rescue Ace::Git::Error, ArgumentError => e
|
|
219
|
+
render_failure(options, e)
|
|
187
220
|
raise Ace::Support::Cli::Error.new(e.message)
|
|
188
221
|
end
|
|
189
222
|
end
|
data/lib/ace/git/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ace-git
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.28.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michal Czyz
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-10-
|
|
10
|
+
date: 2026-10-04 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: ace-support-config
|