repository-provider 29.1.3 → 29.2.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/README.md +6 -12
- package/package.json +2 -2
- package/src/base-object.mjs +2 -2
- package/src/branch.mjs +1 -1
- package/src/hook.mjs +1 -1
- package/src/named-object.mjs +1 -1
- package/src/owned-object.mjs +2 -2
- package/src/pull-request.mjs +2 -2
- package/src/repository-group.mjs +1 -1
- package/src/repository.mjs +10 -9
- package/src/tag.mjs +1 -1
package/README.md
CHANGED
|
@@ -202,7 +202,7 @@ console.log(await readme.getString());
|
|
|
202
202
|
* [Parameters](#parameters-46)
|
|
203
203
|
* [equals](#equals-3)
|
|
204
204
|
* [Parameters](#parameters-47)
|
|
205
|
-
* [
|
|
205
|
+
* [addMethodName](#addmethodname)
|
|
206
206
|
* [Project](#project)
|
|
207
207
|
* [PullRequest](#pullrequest)
|
|
208
208
|
* [Parameters](#parameters-48)
|
|
@@ -327,7 +327,6 @@ console.log(await readme.getString());
|
|
|
327
327
|
* [type](#type-1)
|
|
328
328
|
* [refId](#refid-1)
|
|
329
329
|
* [Parameters](#parameters-79)
|
|
330
|
-
* [toString](#tostring-2)
|
|
331
330
|
* [toJSON](#tojson-3)
|
|
332
331
|
* [attributes](#attributes-2)
|
|
333
332
|
* [defaultBranchName](#defaultbranchname)
|
|
@@ -489,7 +488,7 @@ Save object attributes in the backing store.
|
|
|
489
488
|
|
|
490
489
|
### toString
|
|
491
490
|
|
|
492
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
491
|
+
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** fullName
|
|
493
492
|
|
|
494
493
|
### displayName
|
|
495
494
|
|
|
@@ -1211,7 +1210,7 @@ Check for equality.
|
|
|
1211
1210
|
|
|
1212
1211
|
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if receiver and owner are equal
|
|
1213
1212
|
|
|
1214
|
-
###
|
|
1213
|
+
### addMethodName
|
|
1215
1214
|
|
|
1216
1215
|
Method name to be called to register one instance in the owner.
|
|
1217
1216
|
sample: Application => \_addApplication
|
|
@@ -1224,7 +1223,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
1224
1223
|
|
|
1225
1224
|
## PullRequest
|
|
1226
1225
|
|
|
1227
|
-
**Extends
|
|
1226
|
+
**Extends OwnedObject**
|
|
1228
1227
|
|
|
1229
1228
|
Abstract pull request.
|
|
1230
1229
|
[Repository#addPullRequest](#repositoryaddpullrequest)
|
|
@@ -1232,7 +1231,7 @@ Abstract pull request.
|
|
|
1232
1231
|
### Parameters
|
|
1233
1232
|
|
|
1234
1233
|
* `source` **[Branch](#branch)** merge source
|
|
1235
|
-
* `
|
|
1234
|
+
* `owner`
|
|
1236
1235
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1237
1236
|
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
1238
1237
|
|
|
@@ -1240,6 +1239,7 @@ Abstract pull request.
|
|
|
1240
1239
|
* `options.state` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?**
|
|
1241
1240
|
* `options.merged` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**
|
|
1242
1241
|
* `options.locked` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?**
|
|
1242
|
+
* `destination` **[Branch](#branch)** merge target
|
|
1243
1243
|
|
|
1244
1244
|
### Properties
|
|
1245
1245
|
|
|
@@ -1920,12 +1920,6 @@ Get sha of a ref.
|
|
|
1920
1920
|
|
|
1921
1921
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** sha of the ref
|
|
1922
1922
|
|
|
1923
|
-
### toString
|
|
1924
|
-
|
|
1925
|
-
full name.
|
|
1926
|
-
|
|
1927
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1928
|
-
|
|
1929
1923
|
### toJSON
|
|
1930
1924
|
|
|
1931
1925
|
Provide name and all defined attributes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.2.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"ava": "^4.2.0",
|
|
37
37
|
"c8": "^7.11.2",
|
|
38
38
|
"documentation": "^13.2.5",
|
|
39
|
-
"repository-provider-test-support": "^2.1.
|
|
39
|
+
"repository-provider-test-support": "^2.1.17",
|
|
40
40
|
"semantic-release": "^19.0.2",
|
|
41
41
|
"typescript": "^4.6.3"
|
|
42
42
|
},
|
package/src/base-object.mjs
CHANGED
package/src/branch.mjs
CHANGED
package/src/hook.mjs
CHANGED
package/src/named-object.mjs
CHANGED
package/src/owned-object.mjs
CHANGED
|
@@ -9,7 +9,7 @@ export class OwnedObject extends NamedObject {
|
|
|
9
9
|
* sample: Application => _addApplication
|
|
10
10
|
* @return {string}
|
|
11
11
|
*/
|
|
12
|
-
static get
|
|
12
|
+
static get addMethodName() {
|
|
13
13
|
return "_add" + this.name;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ export class OwnedObject extends NamedObject {
|
|
|
19
19
|
owner: { value: owner }
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
owner[this.constructor.
|
|
22
|
+
owner[this.constructor.addMethodName](this);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
package/src/pull-request.mjs
CHANGED
|
@@ -28,7 +28,7 @@ import { BaseProvider } from "./base-provider.mjs";
|
|
|
28
28
|
*/
|
|
29
29
|
export class PullRequest extends OwnedObject {
|
|
30
30
|
|
|
31
|
-
static get
|
|
31
|
+
static get addMethodName() {
|
|
32
32
|
return "_addPullRequest";
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -240,7 +240,7 @@ export class PullRequest extends OwnedObject {
|
|
|
240
240
|
async delete() {
|
|
241
241
|
return this.owner === undefined
|
|
242
242
|
? undefined
|
|
243
|
-
: this.owner.deletePullRequest(this.
|
|
243
|
+
: this.owner.deletePullRequest(this.name);
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
/**
|
package/src/repository-group.mjs
CHANGED
package/src/repository.mjs
CHANGED
|
@@ -26,7 +26,7 @@ import { BaseProvider } from "./base-provider.mjs";
|
|
|
26
26
|
*/
|
|
27
27
|
export class Repository extends OwnedObject {
|
|
28
28
|
|
|
29
|
-
static get
|
|
29
|
+
static get addMethodName() {
|
|
30
30
|
return "_addRepository";
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -69,6 +69,7 @@ export class Repository extends OwnedObject {
|
|
|
69
69
|
#branches = new Map();
|
|
70
70
|
#tags = new Map();
|
|
71
71
|
#projects = new Map();
|
|
72
|
+
#applications = new Map();
|
|
72
73
|
#milestones = new Map();
|
|
73
74
|
#pullRequests = new Map();
|
|
74
75
|
#hooks = [];
|
|
@@ -461,6 +462,14 @@ export class Repository extends OwnedObject {
|
|
|
461
462
|
return this.#projects.get(name);
|
|
462
463
|
}
|
|
463
464
|
|
|
465
|
+
_addApplication(application) {
|
|
466
|
+
this.#applications.set(application.name, application);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
async application(name) {
|
|
470
|
+
return this.#applications.get(name);
|
|
471
|
+
}
|
|
472
|
+
|
|
464
473
|
/**
|
|
465
474
|
* Get type of the repository.
|
|
466
475
|
* @return {string} 'git'
|
|
@@ -477,14 +486,6 @@ export class Repository extends OwnedObject {
|
|
|
477
486
|
async refId(ref) {
|
|
478
487
|
}
|
|
479
488
|
|
|
480
|
-
/**
|
|
481
|
-
* full name.
|
|
482
|
-
* @returns {string}
|
|
483
|
-
*/
|
|
484
|
-
toString() {
|
|
485
|
-
return this.fullName;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
489
|
/**
|
|
489
490
|
* Provide name and all defined attributes
|
|
490
491
|
*/
|