vouchington-tooling 0.6.0 → 0.6.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Checkpoint, type GitHubComment } from './codec.mts';
|
|
1
|
+
import { type Checkpoint, type CheckpointCodecOptions, type GitHubComment } from './codec.mts';
|
|
2
2
|
export type CheckpointSelectionContext = {
|
|
3
3
|
repository: string;
|
|
4
4
|
pr: number;
|
|
@@ -8,7 +8,7 @@ export type CheckpointSelectionContext = {
|
|
|
8
8
|
isAncestor: (candidate: string, head: string) => boolean;
|
|
9
9
|
isShepherdRun: (runId: string) => boolean;
|
|
10
10
|
};
|
|
11
|
-
export declare function selectResumeCheckpoint(comments: GitHubComment[], context: CheckpointSelectionContext): {
|
|
11
|
+
export declare function selectResumeCheckpoint(comments: GitHubComment[], context: CheckpointSelectionContext, options?: CheckpointCodecOptions): {
|
|
12
12
|
checkpoint: Checkpoint;
|
|
13
13
|
commentId: number;
|
|
14
14
|
} | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isTrustedCheckpointComment, sortedCheckpointCandidates, } from './codec.mjs';
|
|
2
|
-
export function selectResumeCheckpoint(comments, context) {
|
|
3
|
-
const candidates = sortedCheckpointCandidates(comments);
|
|
2
|
+
export function selectResumeCheckpoint(comments, context, options = {}) {
|
|
3
|
+
const candidates = sortedCheckpointCandidates(comments, options);
|
|
4
4
|
for (const { comment, checkpoint } of candidates) {
|
|
5
5
|
if (!isTrustedCheckpointComment(comment, context) ||
|
|
6
6
|
checkpoint.actor !== context.actor ||
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CheckpointStatus, type GitHubComment } from './codec.mts';
|
|
1
|
+
import { type CheckpointCodecOptions, type CheckpointStatus, type GitHubComment } from './codec.mts';
|
|
2
2
|
export type CheckpointUpdateContext = {
|
|
3
3
|
actor: string;
|
|
4
4
|
commentId: number;
|
|
@@ -12,4 +12,4 @@ export type CheckpointUpdateContext = {
|
|
|
12
12
|
export declare function updateExactCheckpoint(comment: GitHubComment, context: CheckpointUpdateContext, status: Extract<CheckpointStatus, 'failed' | 'running'>, session: {
|
|
13
13
|
id?: string;
|
|
14
14
|
url?: string;
|
|
15
|
-
}): string;
|
|
15
|
+
}, options?: CheckpointCodecOptions): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isTrustedCheckpointComment, parseCheckpoint, renderCheckpoint, } from './codec.mjs';
|
|
2
|
-
export function updateExactCheckpoint(comment, context, status, session) {
|
|
3
|
-
const checkpoint = parseCheckpoint(comment.body ?? '');
|
|
2
|
+
export function updateExactCheckpoint(comment, context, status, session, options = {}) {
|
|
3
|
+
const checkpoint = parseCheckpoint(comment.body ?? '', options);
|
|
4
4
|
if (!checkpoint ||
|
|
5
5
|
comment.id !== context.commentId ||
|
|
6
6
|
!isTrustedCheckpointComment(comment, context) ||
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vouchington-tooling",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Vouchington CLI and extractable tooling libraries.",
|
|
5
5
|
"homepage": "https://github.com/vouchington/vouchington-tooling/tree/main/packages/vouchington-tooling#readme",
|
|
6
6
|
"bugs": {
|