repository-provider 29.2.0 → 29.2.3
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 +16 -16
- package/package.json +6 -6
- package/src/base-object.mjs +16 -0
- package/src/branch.mjs +1 -1
- package/src/hook.mjs +1 -1
- package/src/pull-request.mjs +2 -4
- package/src/ref.mjs +0 -8
- package/src/repository.mjs +0 -8
package/README.md
CHANGED
|
@@ -68,6 +68,8 @@ console.log(await readme.getString());
|
|
|
68
68
|
* [toString](#tostring)
|
|
69
69
|
* [displayName](#displayname)
|
|
70
70
|
* [fullName](#fullname)
|
|
71
|
+
* [fullCondensedName](#fullcondensedname)
|
|
72
|
+
* [identifier](#identifier)
|
|
71
73
|
* [isWritable](#iswritable)
|
|
72
74
|
* [equals](#equals)
|
|
73
75
|
* [Parameters](#parameters-8)
|
|
@@ -218,7 +220,7 @@ console.log(await readme.getString());
|
|
|
218
220
|
* [Parameters](#parameters-50)
|
|
219
221
|
* [decline](#decline)
|
|
220
222
|
* [reviews](#reviews)
|
|
221
|
-
* [identifier](#identifier)
|
|
223
|
+
* [identifier](#identifier-1)
|
|
222
224
|
* [validStates](#validstates)
|
|
223
225
|
* [defaultListStates](#defaultliststates)
|
|
224
226
|
* [validMergeMethods](#validmergemethods)
|
|
@@ -247,8 +249,7 @@ console.log(await readme.getString());
|
|
|
247
249
|
* [Parameters](#parameters-56)
|
|
248
250
|
* [repository](#repository-2)
|
|
249
251
|
* [fullName](#fullname-3)
|
|
250
|
-
* [fullCondensedName](#fullcondensedname)
|
|
251
|
-
* [identifier](#identifier-1)
|
|
252
|
+
* [fullCondensedName](#fullcondensedname-1)
|
|
252
253
|
* [toString](#tostring-1)
|
|
253
254
|
* [issuesURL](#issuesurl)
|
|
254
255
|
* [homePageURL](#homepageurl-1)
|
|
@@ -271,7 +272,6 @@ console.log(await readme.getString());
|
|
|
271
272
|
* [Properties](#properties-10)
|
|
272
273
|
* [fullName](#fullname-4)
|
|
273
274
|
* [slug](#slug)
|
|
274
|
-
* [identifier](#identifier-2)
|
|
275
275
|
* [entry](#entry-1)
|
|
276
276
|
* [Parameters](#parameters-60)
|
|
277
277
|
* [entries](#entries-1)
|
|
@@ -502,6 +502,18 @@ Complete name in the hierachy.
|
|
|
502
502
|
|
|
503
503
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
504
504
|
|
|
505
|
+
### fullCondensedName
|
|
506
|
+
|
|
507
|
+
Complete name in the hierachy.
|
|
508
|
+
|
|
509
|
+
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
510
|
+
|
|
511
|
+
### identifier
|
|
512
|
+
|
|
513
|
+
Short human readable identifier with provider and branch.
|
|
514
|
+
|
|
515
|
+
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
516
|
+
|
|
505
517
|
### isWritable
|
|
506
518
|
|
|
507
519
|
By default cannot be written to.
|
|
@@ -1484,12 +1496,6 @@ But skipping the branch name if it is the default branch.
|
|
|
1484
1496
|
|
|
1485
1497
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 'user/repo#branch'
|
|
1486
1498
|
|
|
1487
|
-
### identifier
|
|
1488
|
-
|
|
1489
|
-
Short human readable identifier with provider and branch.
|
|
1490
|
-
|
|
1491
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1492
|
-
|
|
1493
1499
|
### toString
|
|
1494
1500
|
|
|
1495
1501
|
Same as identifier.
|
|
@@ -1620,12 +1626,6 @@ Name of the repo as used in the URL.
|
|
|
1620
1626
|
|
|
1621
1627
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1622
1628
|
|
|
1623
|
-
### identifier
|
|
1624
|
-
|
|
1625
|
-
Short human readable identifier with provider and branch.
|
|
1626
|
-
|
|
1627
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1628
|
-
|
|
1629
1629
|
### entry
|
|
1630
1630
|
|
|
1631
1631
|
Lookup entries form the head of the default branch.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "29.2.
|
|
3
|
+
"version": "29.2.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,21 +27,21 @@
|
|
|
27
27
|
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
28
28
|
"lint": "npm run lint:docs && npm run lint:tsc",
|
|
29
29
|
"lint:docs": "documentation lint ./src/**/*.mjs",
|
|
30
|
-
"lint:tsc": "tsc --allowJs --checkJs --noEmit -t es2022 ./src/*.mjs"
|
|
30
|
+
"lint:tsc": "tsc --allowJs --checkJs --noEmit -t es2022 -m node16 ./src/*.mjs"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"matching-iterator": "^2.0.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"ava": "^4.2.0",
|
|
37
|
-
"c8": "^7.11.
|
|
37
|
+
"c8": "^7.11.3",
|
|
38
38
|
"documentation": "^13.2.5",
|
|
39
|
-
"repository-provider-test-support": "^2.1.
|
|
39
|
+
"repository-provider-test-support": "^2.1.19",
|
|
40
40
|
"semantic-release": "^19.0.2",
|
|
41
|
-
"typescript": "^4.
|
|
41
|
+
"typescript": "^4.7.2"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=16.
|
|
44
|
+
"node": ">=16.15.0"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|
|
47
47
|
"type": "git",
|
package/src/base-object.mjs
CHANGED
|
@@ -104,6 +104,22 @@ export class BaseObject {
|
|
|
104
104
|
return this.name;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Complete name in the hierachy.
|
|
109
|
+
* @return {string}
|
|
110
|
+
*/
|
|
111
|
+
get fullCondensedName() {
|
|
112
|
+
return this.fullName;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Short human readable identifier with provider and branch.
|
|
117
|
+
* @return {string}
|
|
118
|
+
*/
|
|
119
|
+
get identifier() {
|
|
120
|
+
return `${this.provider.name}:${this.fullCondensedName}`;
|
|
121
|
+
}
|
|
122
|
+
|
|
107
123
|
/**
|
|
108
124
|
* By default cannot be written to.
|
|
109
125
|
* @return {boolean} false
|
package/src/branch.mjs
CHANGED
package/src/hook.mjs
CHANGED
|
@@ -8,7 +8,6 @@ export class Hook extends OwnedObject {
|
|
|
8
8
|
static get attributes() {
|
|
9
9
|
return {
|
|
10
10
|
...super.attributes,
|
|
11
|
-
id: { type: "string", writable: true },
|
|
12
11
|
url: { type: "url", description: "target url", writable: true },
|
|
13
12
|
secret: { type: "string", private: true, writable: true },
|
|
14
13
|
content_type: { type: "string", default: "json", writable: true },
|
|
@@ -34,3 +33,4 @@ export class Hook extends OwnedObject {
|
|
|
34
33
|
return optionJSON(this, { name: this.name, id: this.id, events: [...this.events] });
|
|
35
34
|
}
|
|
36
35
|
}
|
|
36
|
+
|
package/src/pull-request.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { BaseProvider } from "./base-provider.mjs";
|
|
|
9
9
|
* Abstract pull request.
|
|
10
10
|
* {@link Repository#addPullRequest}
|
|
11
11
|
* @param {Branch} source merge source
|
|
12
|
-
* @param {Branch}
|
|
12
|
+
* @param {Branch} owner merge target
|
|
13
13
|
* @param {string} name
|
|
14
14
|
* @param {Object} options
|
|
15
15
|
* @param {string} [options.title]
|
|
@@ -218,9 +218,7 @@ export class PullRequest extends OwnedObject {
|
|
|
218
218
|
* @return {BaseProvider}
|
|
219
219
|
*/
|
|
220
220
|
get provider() {
|
|
221
|
-
return this.owner
|
|
222
|
-
? undefined
|
|
223
|
-
: this.owner.provider;
|
|
221
|
+
return this.owner && this.owner.provider;
|
|
224
222
|
}
|
|
225
223
|
|
|
226
224
|
/**
|
package/src/ref.mjs
CHANGED
|
@@ -116,14 +116,6 @@ export class Ref extends OwnedObject {
|
|
|
116
116
|
: `${this.owner.fullName}#${this.name}`;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
/**
|
|
120
|
-
* Short human readable identifier with provider and branch.
|
|
121
|
-
* @return {string}
|
|
122
|
-
*/
|
|
123
|
-
get identifier() {
|
|
124
|
-
return `${this.provider.name}:${this.fullCondensedName}`;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
119
|
/**
|
|
128
120
|
* Same as identifier.
|
|
129
121
|
* @return {string}
|
package/src/repository.mjs
CHANGED
|
@@ -96,14 +96,6 @@ export class Repository extends OwnedObject {
|
|
|
96
96
|
return `${this.owner.name}/${this.name}`;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
/**
|
|
100
|
-
* Short human readable identifier with provider and branch.
|
|
101
|
-
* @return {string}
|
|
102
|
-
*/
|
|
103
|
-
get identifier() {
|
|
104
|
-
return `${this.provider.name}:${this.fullName}`;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
99
|
/**
|
|
108
100
|
* Lookup entries form the head of the default branch.
|
|
109
101
|
* {@link Branch#entry}
|