@chisquare-tech/origine-ngx-apps-code 0.7.0 → 0.9.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.7.0",
3
+ "version": "0.9.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;
@@ -72,6 +74,13 @@ interface Commit {
72
74
  committer: GitPerson;
73
75
  parents: string[];
74
76
  keys: string[];
77
+ signed?: boolean;
78
+ /** The signature checked against the committer's signing keys (DEV-31); absent when unsigned. */
79
+ verification?: {
80
+ verified: boolean;
81
+ reason: string;
82
+ signer?: string;
83
+ };
75
84
  }
76
85
  interface FileChange {
77
86
  status: string;
@@ -255,6 +264,10 @@ interface Protection {
255
264
  dismissStaleApprovals: boolean;
256
265
  requireUpToDate: boolean;
257
266
  requireCodeOwnerReview?: boolean;
267
+ requireSignedCommits?: boolean;
268
+ requireLinearHistory?: boolean;
269
+ /** Roles that may bypass the rule: owner, admin, maintainer. */
270
+ bypass?: string[];
258
271
  requiredChecks: string[];
259
272
  }
260
273
  interface PullBrief {
@@ -303,6 +316,9 @@ interface CheckStatus {
303
316
  description?: string;
304
317
  }
305
318
  interface Pull {
319
+ /** Armed to merge with autoMergeMethod once the gate passes, by autoMergeBy (DEV-25). */
320
+ autoMergeBy?: string;
321
+ autoMergeMethod?: string;
306
322
  number: number;
307
323
  title: string;
308
324
  body: string;
@@ -416,6 +432,7 @@ declare class CodeApi {
416
432
  defaultBranch: string;
417
433
  mergeMethods: string[];
418
434
  deleteBranchOnMerge: boolean;
435
+ allowAutoMerge: boolean;
419
436
  }>): Observable<Repo>;
420
437
  remove(project: string, name: string): Observable<unknown>;
421
438
  setArchived(project: string, name: string, on: boolean): Observable<Repo>;
@@ -505,6 +522,8 @@ declare class CodeApi {
505
522
  }): Observable<Pull>;
506
523
  conversation(project: string, name: string, n: number): Observable<Timeline>;
507
524
  comment(project: string, name: string, n: number, c: NewComment): Observable<PRComment>;
525
+ /** Arms (method) or disarms (null) auto-merge on a pull request (DEV-25). */
526
+ autoMerge(project: string, name: string, n: number, method: string | null): Observable<Pull>;
508
527
  /** Commits suggested changes of line comments onto the pull request's branch (DEV-20). */
509
528
  applySuggestions(project: string, name: string, n: number, comments: string[], message?: string): Observable<CommitResult>;
510
529
  /** Discards one of the caller's pending review comments. */
@@ -548,6 +567,8 @@ declare class CurrentRepo {
548
567
  * component's encapsulation, hence ::ng-deep.
549
568
  */
550
569
  declare const TOKEN_CSS = "\n :host ::ng-deep [class^=\"tk-k\"]{color:var(--o-tk-k)}\n :host ::ng-deep [class^=\"tk-s\"], :host ::ng-deep [class^=\"tk-l\"]{color:var(--o-tk-s)}\n :host ::ng-deep [class^=\"tk-c\"]{color:var(--o-tk-c);font-style:italic}\n :host ::ng-deep [class^=\"tk-m\"]{color:var(--o-tk-n)}\n :host ::ng-deep .tk-nf, :host ::ng-deep .tk-nx, :host ::ng-deep .tk-fm{color:var(--o-tk-f)}\n :host ::ng-deep .tk-nb, :host ::ng-deep .tk-nt, :host ::ng-deep .tk-bp{color:var(--o-tk-p)}\n :host ::ng-deep .tk-gi{color:var(--o-add)} :host ::ng-deep .tk-gd{color:var(--o-bad-tx)}\n";
570
+ /** Why a signed commit is not verified (DEV-31). */
571
+ declare function verifyWhy(reason: string): string;
551
572
 
552
573
  /**
553
574
  * What every page under /code/:repo shares: the project, the repository named in the URL (loaded
@@ -564,6 +585,7 @@ declare abstract class RepoPage {
564
585
  protected readonly error: _angular_core.WritableSignal<string>;
565
586
  protected readonly note: _angular_core.WritableSignal<string>;
566
587
  protected readonly people: _angular_core.Signal<People>;
588
+ protected readonly verifyWhy: typeof verifyWhy;
567
589
  protected readonly canWrite: _angular_core.Signal<boolean>;
568
590
  protected readonly canAdmin: _angular_core.Signal<boolean>;
569
591
  /** Repository settings short of a rename, the visibility and deletion: Maintainers, and maintain collaborators. */
@@ -807,6 +829,7 @@ declare class CommitBox {
807
829
  protected readonly toNew: _angular_core.WritableSignal<boolean>;
808
830
  protected readonly newBranch: _angular_core.WritableSignal<string>;
809
831
  private readonly rules;
832
+ /** Direct commits are refused: the rules block direct pushes, or require signed commits (a browser commit is unsigned). */
810
833
  protected readonly blocked: _angular_core.Signal<boolean>;
811
834
  constructor();
812
835
  protected send(): void;
@@ -1042,6 +1065,8 @@ declare class PullPage extends RepoPage {
1042
1065
  protected addComment(): void;
1043
1066
  protected lineComment(c: LineComment): void;
1044
1067
  protected readonly batch: _angular_core.WritableSignal<string[]>;
1068
+ /** Arms auto-merge with a method, or disarms it (null). */
1069
+ protected setAutoMerge(method: string | null): void;
1045
1070
  protected toggleBatch(id: string): void;
1046
1071
  /** Commits one suggestion, or the batch, onto the pull request's branch. */
1047
1072
  protected applySuggestions(ids: string[]): void;
@@ -1077,6 +1102,9 @@ interface RuleForm {
1077
1102
  dismissStaleApprovals: boolean;
1078
1103
  requireUpToDate: boolean;
1079
1104
  requireCodeOwnerReview: boolean;
1105
+ requireSignedCommits: boolean;
1106
+ requireLinearHistory: boolean;
1107
+ bypass: string[];
1080
1108
  requiredChecks: string[];
1081
1109
  }
1082
1110
  declare class RepoSettingsPage extends RepoPage {
@@ -1095,16 +1123,21 @@ declare class RepoSettingsPage extends RepoPage {
1095
1123
  defaultBranch: string;
1096
1124
  mergeMethods: string[];
1097
1125
  deleteBranchOnMerge: boolean;
1126
+ allowAutoMerge: boolean;
1098
1127
  };
1099
1128
  protected readonly methods: {
1100
1129
  id: string;
1101
1130
  label: string;
1102
1131
  }[];
1103
1132
  protected readonly toggles: {
1104
- key: 'blockDirectPush' | 'blockForcePush' | 'blockDeletion' | 'dismissStaleApprovals' | 'requireUpToDate' | 'requireCodeOwnerReview';
1133
+ key: 'blockDirectPush' | 'blockForcePush' | 'blockDeletion' | 'dismissStaleApprovals' | 'requireUpToDate' | 'requireCodeOwnerReview' | 'requireSignedCommits' | 'requireLinearHistory';
1105
1134
  label: string;
1106
1135
  hint: string;
1107
1136
  }[];
1137
+ protected readonly bypassRoles: {
1138
+ id: string;
1139
+ label: string;
1140
+ }[];
1108
1141
  constructor();
1109
1142
  protected readonly collabs: _angular_core.WritableSignal<Collaborator[]>;
1110
1143
  protected readonly perms: {
@@ -1124,6 +1157,7 @@ declare class RepoSettingsPage extends RepoPage {
1124
1157
  protected flipMethod(id: string): void;
1125
1158
  protected summary(p: Protection): string;
1126
1159
  protected edit(p: Protection | null): void;
1160
+ protected flipBypass(f: RuleForm, role: string): void;
1127
1161
  protected flip(f: RuleForm, k: (typeof this.toggles)[number]['key']): void;
1128
1162
  protected addCheck(f: RuleForm): void;
1129
1163
  protected removeCheck(f: RuleForm, c: string): void;
@@ -1210,5 +1244,5 @@ declare class NewFilePage extends RepoPage {
1210
1244
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NewFilePage, "o-code-new-file", never, {}, {}, never, never, true, never>;
1211
1245
  }
1212
1246
 
1213
- export { BranchesPage, CodeApi, CodeHost, CommitBox, CommitPage, CommitsPage, CurrentRepo, CurrentRepoPage, DiffView, FilePage, NewFilePage, NewRepoPage, People, PullPage, PullsPage, RefPicker, ReleasesPage, RepoHomePage, RepoPage, RepoSettingsPage, ReposPage, TOKEN_CSS, ago, apiMessage, checkDot, copy, dayLabel, initials, langColour, matchesPattern, pair, shortDate, size };
1247
+ export { BranchesPage, CodeApi, CodeHost, CommitBox, CommitPage, CommitsPage, CurrentRepo, CurrentRepoPage, DiffView, FilePage, NewFilePage, NewRepoPage, People, PullPage, PullsPage, RefPicker, ReleasesPage, RepoHomePage, RepoPage, RepoSettingsPage, ReposPage, TOKEN_CSS, ago, apiMessage, checkDot, copy, dayLabel, initials, langColour, matchesPattern, pair, shortDate, size, verifyWhy };
1214
1248
  export type { BlameHunk, Blob, CheckStatus, CodePerson, CodeProject, Collaborator, Commit, CommitChoice, CommitDetail, CommitRequest, CommitResult, Comparison, DiffHunk, DiffLine, Entry, FileChange, FileDiff, Gate, GateRow, GitPerson, Language, LineComment, NewComment, PRComment, Protection, Pull, PullBrief, Ref, Release, ReleaseAsset, ReleaseInput, Repo, Review, ReviewBrief, SplitRow, Thread, ThreadReply, Timeline, Tree };