@chisquare-tech/origine-ngx-apps-code 0.5.0 → 0.7.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.5.0",
3
+ "version": "0.7.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",
@@ -254,6 +254,7 @@ interface Protection {
254
254
  requiredApprovals: number;
255
255
  dismissStaleApprovals: boolean;
256
256
  requireUpToDate: boolean;
257
+ requireCodeOwnerReview?: boolean;
257
258
  requiredChecks: string[];
258
259
  }
259
260
  interface PullBrief {
@@ -345,6 +346,8 @@ interface PRComment {
345
346
  pending: boolean;
346
347
  createdAt: string;
347
348
  editedAt?: string;
349
+ /** The commit that applied this comment's suggested change. */
350
+ appliedSha?: string;
348
351
  }
349
352
  interface Review {
350
353
  id: string;
@@ -502,6 +505,8 @@ declare class CodeApi {
502
505
  }): Observable<Pull>;
503
506
  conversation(project: string, name: string, n: number): Observable<Timeline>;
504
507
  comment(project: string, name: string, n: number, c: NewComment): Observable<PRComment>;
508
+ /** Commits suggested changes of line comments onto the pull request's branch (DEV-20). */
509
+ applySuggestions(project: string, name: string, n: number, comments: string[], message?: string): Observable<CommitResult>;
505
510
  /** Discards one of the caller's pending review comments. */
506
511
  discardComment(project: string, name: string, n: number, id: string): Observable<unknown>;
507
512
  review(project: string, name: string, n: number, state: 'commented' | 'approved' | 'changes_requested', body?: string): Observable<Review>;
@@ -634,6 +639,12 @@ declare class DiffView implements AfterViewInit {
634
639
  resolved: boolean;
635
640
  }>;
636
641
  readonly discard: _angular_core.OutputEmitterRef<string>;
642
+ /** The caller can push to the pull request's branch, so may apply suggestions. */
643
+ readonly canApply: _angular_core.InputSignal<boolean>;
644
+ /** Suggestions batched to apply together. */
645
+ readonly batch: _angular_core.InputSignal<string[]>;
646
+ readonly apply: _angular_core.OutputEmitterRef<string[]>;
647
+ readonly batchToggle: _angular_core.OutputEmitterRef<string>;
637
648
  readonly viewedChange: _angular_core.OutputEmitterRef<boolean>;
638
649
  protected readonly open: _angular_core.WritableSignal<boolean>;
639
650
  protected readonly visible: _angular_core.WritableSignal<boolean>;
@@ -663,10 +674,16 @@ declare class DiffView implements AfterViewInit {
663
674
  protected threadsAt(l: DiffLine): Thread[];
664
675
  protected startComment(l: DiffLine): void;
665
676
  protected send(l: DiffLine, pending: boolean): void;
677
+ /** A comment's ```suggestion block, split into the text before it and the suggested lines. */
678
+ protected suggestionOf(body: string): {
679
+ before: string;
680
+ lines: string[];
681
+ } | null;
682
+ protected insertSuggestion(l: DiffLine): void;
666
683
  protected setReply(id: string, v: string): void;
667
684
  protected sendReply(id: string): void;
668
685
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DiffView, never>;
669
- 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>;
686
+ 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>;
670
687
  }
671
688
  /** Pairs a hunk's lines side by side: context on both sides, a run of removals beside the run of additions that follows it. */
672
689
  declare function pair(lines: DiffLine[]): SplitRow[];
@@ -1024,6 +1041,10 @@ declare class PullPage extends RepoPage {
1024
1041
  protected submitReview(): void;
1025
1042
  protected addComment(): void;
1026
1043
  protected lineComment(c: LineComment): void;
1044
+ protected readonly batch: _angular_core.WritableSignal<string[]>;
1045
+ protected toggleBatch(id: string): void;
1046
+ /** Commits one suggestion, or the batch, onto the pull request's branch. */
1047
+ protected applySuggestions(ids: string[]): void;
1027
1048
  protected discard(id: string): void;
1028
1049
  protected setMode(m: 'unified' | 'split'): void;
1029
1050
  private viewedKey;
@@ -1055,6 +1076,7 @@ interface RuleForm {
1055
1076
  requiredApprovals: number;
1056
1077
  dismissStaleApprovals: boolean;
1057
1078
  requireUpToDate: boolean;
1079
+ requireCodeOwnerReview: boolean;
1058
1080
  requiredChecks: string[];
1059
1081
  }
1060
1082
  declare class RepoSettingsPage extends RepoPage {
@@ -1079,7 +1101,7 @@ declare class RepoSettingsPage extends RepoPage {
1079
1101
  label: string;
1080
1102
  }[];
1081
1103
  protected readonly toggles: {
1082
- key: 'blockDirectPush' | 'blockForcePush' | 'blockDeletion' | 'dismissStaleApprovals' | 'requireUpToDate';
1104
+ key: 'blockDirectPush' | 'blockForcePush' | 'blockDeletion' | 'dismissStaleApprovals' | 'requireUpToDate' | 'requireCodeOwnerReview';
1083
1105
  label: string;
1084
1106
  hint: string;
1085
1107
  }[];