@compforge/harness-common 0.5.6 → 0.5.7
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.
- package/README.md +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/system/pull-request.d.ts +27 -0
- package/dist/system/pull-request.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -183,3 +183,10 @@ custom Entry now renders consistently when shown alone or through its Dictionary
|
|
|
183
183
|
relationships without duplicating identity. `ResourceSnapshot` retains typed instances, unit-bearing
|
|
184
184
|
measurements, independently known totals and complete/partial/unavailable coverage. Discovery and
|
|
185
185
|
rendering remain consumer-owned. See [the shared contract](../../../docs/resource.md).
|
|
186
|
+
|
|
187
|
+
## PullRequest
|
|
188
|
+
|
|
189
|
+
`PullRequest` identifies a PR/MR by its target `Repository` and repository-local number.
|
|
190
|
+
State, branches, source repository, revisions and provider timestamps are optional facts.
|
|
191
|
+
See [the shared contract](../../../docs/pull-request.md) for identity and unknown-state semantics.
|
|
192
|
+
Forge access and polling remain consumer/toolkit responsibilities.
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./access/datasource.js";
|
|
|
6
6
|
export * from "./system/workload.js";
|
|
7
7
|
export * from "./system/forge.js";
|
|
8
8
|
export * from "./system/repository.js";
|
|
9
|
+
export * from "./system/pull-request.js";
|
|
9
10
|
export * from "./system/component.js";
|
|
10
11
|
export * from "./system/host.js";
|
|
11
12
|
export * from "./system/environment.js";
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./access/datasource.js";
|
|
|
6
6
|
export * from "./system/workload.js";
|
|
7
7
|
export * from "./system/forge.js";
|
|
8
8
|
export * from "./system/repository.js";
|
|
9
|
+
export * from "./system/pull-request.js";
|
|
9
10
|
export * from "./system/component.js";
|
|
10
11
|
export * from "./system/host.js";
|
|
11
12
|
export * from "./system/environment.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Identity } from "../identity.js";
|
|
2
|
+
import { type Repository } from "./repository.js";
|
|
3
|
+
export type PullRequestState = "open" | "merged" | "closed";
|
|
4
|
+
/**
|
|
5
|
+
* A code-review proposal owned by its target Repository (GitHub PR or GitLab MR).
|
|
6
|
+
* @spec Identity is target Repository + repository-local number; source, revisions and state are metadata.
|
|
7
|
+
* @spec Omitted facts are unknown. A missing state or mergedAt never proves closure or merge.
|
|
8
|
+
* @see {@link component://docs/pull-request.md}
|
|
9
|
+
*/
|
|
10
|
+
export interface PullRequest extends Identity {
|
|
11
|
+
readonly repository: Repository;
|
|
12
|
+
/** Positive GitHub PR number or GitLab MR iid, not the provider's global database ID. */
|
|
13
|
+
readonly number: number;
|
|
14
|
+
readonly title?: string;
|
|
15
|
+
readonly url?: string;
|
|
16
|
+
readonly state?: PullRequestState;
|
|
17
|
+
readonly sourceRepository?: Repository;
|
|
18
|
+
readonly sourceBranch?: string;
|
|
19
|
+
readonly targetBranch?: string;
|
|
20
|
+
readonly headSha?: string;
|
|
21
|
+
readonly baseSha?: string;
|
|
22
|
+
/** Provider timestamps, represented as ISO 8601 strings. */
|
|
23
|
+
readonly updatedAt?: string;
|
|
24
|
+
readonly mergedAt?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Derive identity from fields; never trust a consumer's display URL or repository id method. */
|
|
27
|
+
export declare function pullRequestId(pr: Pick<PullRequest, "repository" | "number">): string;
|