rungate 0.8.5 → 0.8.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/lib/github.ts CHANGED
@@ -42,6 +42,31 @@ export interface GitHubClient {
42
42
  get: (params: { owner: string; repo: string; pull_number: number }) => Promise<{ data: any }>;
43
43
  update: (params: { owner: string; repo: string; pull_number: number; [key: string]: any }) => Promise<{ data: any }>;
44
44
  list: (params: { owner: string; repo: string; [key: string]: any }) => Promise<{ data: any[] }>;
45
+ /**
46
+ * One INLINE review comment, anchored to the diff (#1612).
47
+ *
48
+ * Not `issues.createComment`, which is the other endpoint and the one
49
+ * the findings ledger uses. The difference is not cosmetic: only a
50
+ * comment created here opens a review THREAD, and a review thread is
51
+ * the only thing `required_conversation_resolution` can read. A
52
+ * repository that turns that protection on while its reviewer posts
53
+ * issue comments has a required gate over an always-empty population.
54
+ *
55
+ * `line` is omitted and `subject_type: "file"` sent in its place when
56
+ * the finding could not be anchored to a line — the API documents
57
+ * `line` as "Required unless using subject_type:file", and answers 422
58
+ * for a line outside a diff hunk.
59
+ */
60
+ createReviewComment: (params: {
61
+ owner: string;
62
+ repo: string;
63
+ pull_number: number;
64
+ body: string;
65
+ commit_id: string;
66
+ path: string;
67
+ line?: number;
68
+ subject_type?: "line" | "file";
69
+ }) => Promise<{ data: any }>;
45
70
  };
46
71
  repos: {
47
72
  /** Repository metadata. `owner.type` and `default_branch` are what PROTECT-1 reads (#909). */