repository-provider 35.2.28 → 35.3.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 +1 -1
- package/src/commit.mjs +13 -1
- package/src/repository.mjs +13 -8
- package/types/commit.d.mts +17 -2
- package/types/repository.d.mts +16 -7
package/package.json
CHANGED
package/src/commit.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Repository } from "./repository.mjs";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* @property {string} ref
|
|
3
5
|
*/
|
|
@@ -21,7 +23,17 @@ export class User {}
|
|
|
21
23
|
export class Commit {
|
|
22
24
|
repository;
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param {Repository} repository
|
|
29
|
+
* @param {Object} options
|
|
30
|
+
* @param {string} options.sha
|
|
31
|
+
* @param {string} options.message
|
|
32
|
+
* @param {string} options.author
|
|
33
|
+
* @param {string} options.committer
|
|
34
|
+
*/
|
|
35
|
+
constructor(repository, options) {
|
|
25
36
|
this.repository = repository;
|
|
37
|
+
Object.assign(this, options);
|
|
26
38
|
}
|
|
27
39
|
}
|
package/src/repository.mjs
CHANGED
|
@@ -19,12 +19,6 @@ import {
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Abstract repository
|
|
22
|
-
* @class Repository
|
|
23
|
-
* @param {RepositoryOwner} owner
|
|
24
|
-
* @param {string} name (#branch) will be removed
|
|
25
|
-
* @param {Object} [options]
|
|
26
|
-
* @param {string} [options.description] human readable description
|
|
27
|
-
* @param {string} [options.id] internal id
|
|
28
22
|
*
|
|
29
23
|
* @property {RepositoryOwner} owner
|
|
30
24
|
* @property {string} name without (#branch)
|
|
@@ -85,8 +79,19 @@ export class Repository extends OwnedObject {
|
|
|
85
79
|
/** @type {Map<string,PullRequest>} */ #pullRequests = new Map();
|
|
86
80
|
#hooks = [];
|
|
87
81
|
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
/**
|
|
83
|
+
* @param {RepositoryOwner} owner
|
|
84
|
+
* @param {string} name (#branch) will be removed
|
|
85
|
+
* @param {Object} [options]
|
|
86
|
+
* @param {string} [options.description] human readable description
|
|
87
|
+
* @param {string} [options.id] internal id
|
|
88
|
+
* @param {Object} [options]
|
|
89
|
+
* @param {string} [options.id]
|
|
90
|
+
* @param {string} [options.description]
|
|
91
|
+
* @param {Object} [additionalProperties]
|
|
92
|
+
*/
|
|
93
|
+
constructor(owner, name, options, additionalProperties) {
|
|
94
|
+
super(owner, owner.normalizeRepositoryName(name, false), options, additionalProperties);
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
/**
|
package/types/commit.d.mts
CHANGED
|
@@ -15,6 +15,21 @@ export class User {
|
|
|
15
15
|
* @property {User} committer
|
|
16
16
|
*/
|
|
17
17
|
export class Commit {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @param {Repository} repository
|
|
21
|
+
* @param {Object} options
|
|
22
|
+
* @param {string} options.sha
|
|
23
|
+
* @param {string} options.message
|
|
24
|
+
* @param {string} options.author
|
|
25
|
+
* @param {string} options.committer
|
|
26
|
+
*/
|
|
27
|
+
constructor(repository: Repository, options: {
|
|
28
|
+
sha: string;
|
|
29
|
+
message: string;
|
|
30
|
+
author: string;
|
|
31
|
+
committer: string;
|
|
32
|
+
});
|
|
33
|
+
repository: Repository;
|
|
20
34
|
}
|
|
35
|
+
import { Repository } from "./repository.mjs";
|
package/types/repository.d.mts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Abstract repository
|
|
3
|
-
* @class Repository
|
|
4
|
-
* @param {RepositoryOwner} owner
|
|
5
|
-
* @param {string} name (#branch) will be removed
|
|
6
|
-
* @param {Object} [options]
|
|
7
|
-
* @param {string} [options.description] human readable description
|
|
8
|
-
* @param {string} [options.id] internal id
|
|
9
3
|
*
|
|
10
4
|
* @property {RepositoryOwner} owner
|
|
11
5
|
* @property {string} name without (#branch)
|
|
@@ -51,7 +45,21 @@ export class Repository extends OwnedObject {
|
|
|
51
45
|
name: import("pacc").AttributeDefinition;
|
|
52
46
|
description: import("pacc").AttributeDefinition;
|
|
53
47
|
};
|
|
54
|
-
|
|
48
|
+
/**
|
|
49
|
+
* @param {RepositoryOwner} owner
|
|
50
|
+
* @param {string} name (#branch) will be removed
|
|
51
|
+
* @param {Object} [options]
|
|
52
|
+
* @param {string} [options.description] human readable description
|
|
53
|
+
* @param {string} [options.id] internal id
|
|
54
|
+
* @param {Object} [options]
|
|
55
|
+
* @param {string} [options.id]
|
|
56
|
+
* @param {string} [options.description]
|
|
57
|
+
* @param {Object} [additionalProperties]
|
|
58
|
+
*/
|
|
59
|
+
constructor(owner: typeof RepositoryOwner, name: string, options?: {
|
|
60
|
+
description?: string;
|
|
61
|
+
id?: string;
|
|
62
|
+
}, additionalProperties?: any);
|
|
55
63
|
get defaultBranchName(): string;
|
|
56
64
|
/**
|
|
57
65
|
* Lookup entries form the head of the default branch.
|
|
@@ -263,3 +271,4 @@ import { Hook } from "./hook.mjs";
|
|
|
263
271
|
import { Milestone } from "./milestone.mjs";
|
|
264
272
|
import { Project } from "./project.mjs";
|
|
265
273
|
import { Application } from "./application.mjs";
|
|
274
|
+
import { RepositoryOwner } from "./repository-owner.mjs";
|