@chisquare-tech/origine-ngx-apps-code 0.6.0 → 0.8.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chisquare-tech/origine-ngx-apps-code",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Origine's Code module screens: repositories, files, commits, branches, pull requests and review, repository settings.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,6 +54,8 @@ interface Repo {
54
54
  empty: boolean;
55
55
  capabilities: string[];
56
56
  readOnly?: boolean;
57
+ /** Pull requests can be armed to merge once the gate passes (DEV-25). */
58
+ allowAutoMerge?: boolean;
57
59
  /** The caller's collaborator permission on this repository (read, write or maintain), if any. */
58
60
  collaborator?: string;
59
61
  createdAt?: string;
@@ -303,6 +305,9 @@ interface CheckStatus {
303
305
  description?: string;
304
306
  }
305
307
  interface Pull {
308
+ /** Armed to merge with autoMergeMethod once the gate passes, by autoMergeBy (DEV-25). */
309
+ autoMergeBy?: string;
310
+ autoMergeMethod?: string;
306
311
  number: number;
307
312
  title: string;
308
313
  body: string;
@@ -346,6 +351,8 @@ interface PRComment {
346
351
  pending: boolean;
347
352
  createdAt: string;
348
353
  editedAt?: string;
354
+ /** The commit that applied this comment's suggested change. */
355
+ appliedSha?: string;
349
356
  }
350
357
  interface Review {
351
358
  id: string;
@@ -414,6 +421,7 @@ declare class CodeApi {
414
421
  defaultBranch: string;
415
422
  mergeMethods: string[];
416
423
  deleteBranchOnMerge: boolean;
424
+ allowAutoMerge: boolean;
417
425
  }>): Observable<Repo>;
418
426
  remove(project: string, name: string): Observable<unknown>;
419
427
  setArchived(project: string, name: string, on: boolean): Observable<Repo>;
@@ -503,6 +511,10 @@ declare class CodeApi {
503
511
  }): Observable<Pull>;
504
512
  conversation(project: string, name: string, n: number): Observable<Timeline>;
505
513
  comment(project: string, name: string, n: number, c: NewComment): Observable<PRComment>;
514
+ /** Arms (method) or disarms (null) auto-merge on a pull request (DEV-25). */
515
+ autoMerge(project: string, name: string, n: number, method: string | null): Observable<Pull>;
516
+ /** Commits suggested changes of line comments onto the pull request's branch (DEV-20). */
517
+ applySuggestions(project: string, name: string, n: number, comments: string[], message?: string): Observable<CommitResult>;
506
518
  /** Discards one of the caller's pending review comments. */
507
519
  discardComment(project: string, name: string, n: number, id: string): Observable<unknown>;
508
520
  review(project: string, name: string, n: number, state: 'commented' | 'approved' | 'changes_requested', body?: string): Observable<Review>;
@@ -635,6 +647,12 @@ declare class DiffView implements AfterViewInit {
635
647
  resolved: boolean;
636
648
  }>;
637
649
  readonly discard: _angular_core.OutputEmitterRef<string>;
650
+ /** The caller can push to the pull request's branch, so may apply suggestions. */
651
+ readonly canApply: _angular_core.InputSignal<boolean>;
652
+ /** Suggestions batched to apply together. */
653
+ readonly batch: _angular_core.InputSignal<string[]>;
654
+ readonly apply: _angular_core.OutputEmitterRef<string[]>;
655
+ readonly batchToggle: _angular_core.OutputEmitterRef<string>;
638
656
  readonly viewedChange: _angular_core.OutputEmitterRef<boolean>;
639
657
  protected readonly open: _angular_core.WritableSignal<boolean>;
640
658
  protected readonly visible: _angular_core.WritableSignal<boolean>;
@@ -664,10 +682,16 @@ declare class DiffView implements AfterViewInit {
664
682
  protected threadsAt(l: DiffLine): Thread[];
665
683
  protected startComment(l: DiffLine): void;
666
684
  protected send(l: DiffLine, pending: boolean): void;
685
+ /** A comment's ```suggestion block, split into the text before it and the suggested lines. */
686
+ protected suggestionOf(body: string): {
687
+ before: string;
688
+ lines: string[];
689
+ } | null;
690
+ protected insertSuggestion(l: DiffLine): void;
667
691
  protected setReply(id: string, v: string): void;
668
692
  protected sendReply(id: string): void;
669
693
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DiffView, never>;
670
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DiffView, "o-diff", never, { "repo": { "alias": "repo"; "required": true; "isSignal": true; }; "file": { "alias": "file"; "required": true; "isSignal": true; }; "head": { "alias": "head"; "required": true; "isSignal": true; }; "base": { "alias": "base"; "required": false; "isSignal": true; }; "threads": { "alias": "threads"; "required": false; "isSignal": true; }; "canComment": { "alias": "canComment"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "ignoreSpace": { "alias": "ignoreSpace"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "reviewing": { "alias": "reviewing"; "required": false; "isSignal": true; }; }, { "comment": "comment"; "reply": "reply"; "resolve": "resolve"; "discard": "discard"; "viewedChange": "viewedChange"; }, never, ["*"], true, never>;
694
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DiffView, "o-diff", never, { "repo": { "alias": "repo"; "required": true; "isSignal": true; }; "file": { "alias": "file"; "required": true; "isSignal": true; }; "head": { "alias": "head"; "required": true; "isSignal": true; }; "base": { "alias": "base"; "required": false; "isSignal": true; }; "threads": { "alias": "threads"; "required": false; "isSignal": true; }; "canComment": { "alias": "canComment"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "ignoreSpace": { "alias": "ignoreSpace"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "reviewing": { "alias": "reviewing"; "required": false; "isSignal": true; }; "canApply": { "alias": "canApply"; "required": false; "isSignal": true; }; "batch": { "alias": "batch"; "required": false; "isSignal": true; }; }, { "comment": "comment"; "reply": "reply"; "resolve": "resolve"; "discard": "discard"; "apply": "apply"; "batchToggle": "batchToggle"; "viewedChange": "viewedChange"; }, never, ["*"], true, never>;
671
695
  }
672
696
  /** Pairs a hunk's lines side by side: context on both sides, a run of removals beside the run of additions that follows it. */
673
697
  declare function pair(lines: DiffLine[]): SplitRow[];
@@ -1025,6 +1049,12 @@ declare class PullPage extends RepoPage {
1025
1049
  protected submitReview(): void;
1026
1050
  protected addComment(): void;
1027
1051
  protected lineComment(c: LineComment): void;
1052
+ protected readonly batch: _angular_core.WritableSignal<string[]>;
1053
+ /** Arms auto-merge with a method, or disarms it (null). */
1054
+ protected setAutoMerge(method: string | null): void;
1055
+ protected toggleBatch(id: string): void;
1056
+ /** Commits one suggestion, or the batch, onto the pull request's branch. */
1057
+ protected applySuggestions(ids: string[]): void;
1028
1058
  protected discard(id: string): void;
1029
1059
  protected setMode(m: 'unified' | 'split'): void;
1030
1060
  private viewedKey;
@@ -1075,6 +1105,7 @@ declare class RepoSettingsPage extends RepoPage {
1075
1105
  defaultBranch: string;
1076
1106
  mergeMethods: string[];
1077
1107
  deleteBranchOnMerge: boolean;
1108
+ allowAutoMerge: boolean;
1078
1109
  };
1079
1110
  protected readonly methods: {
1080
1111
  id: string;