repository-provider 28.3.6 → 28.3.7
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/base-object.mjs +11 -0
- package/src/base-provider.mjs +0 -4
- package/src/branch.mjs +13 -0
- package/src/named-object.mjs +1 -8
- package/src/ref.mjs +0 -13
- package/src/tag.mjs +0 -9
package/package.json
CHANGED
package/src/base-object.mjs
CHANGED
|
@@ -81,6 +81,17 @@ export class BaseObject {
|
|
|
81
81
|
*/
|
|
82
82
|
async update() {}
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* @return {string} name
|
|
86
|
+
*/
|
|
87
|
+
toString() {
|
|
88
|
+
return this.name;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* By default cannot be written to.
|
|
93
|
+
* @return {boolean} false
|
|
94
|
+
*/
|
|
84
95
|
get isWritable() {
|
|
85
96
|
return false;
|
|
86
97
|
}
|
package/src/base-provider.mjs
CHANGED
package/src/branch.mjs
CHANGED
|
@@ -38,6 +38,19 @@ export class Branch extends Ref {
|
|
|
38
38
|
return "heads";
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @return true if not {@link isArchived} and {@link isDisabled} and {@link isLocked}
|
|
44
|
+
*/
|
|
45
|
+
get isWritable() {
|
|
46
|
+
return (
|
|
47
|
+
!this.isArchived &&
|
|
48
|
+
!this.isDisabled &&
|
|
49
|
+
!this.isLocked &&
|
|
50
|
+
!this.isProtected
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
41
54
|
/**
|
|
42
55
|
* Are we the default branch.
|
|
43
56
|
* @return {boolean} true if name matches the repository default branch
|
package/src/named-object.mjs
CHANGED
|
@@ -44,14 +44,7 @@ export class NamedObject extends BaseObject {
|
|
|
44
44
|
get fullName() {
|
|
45
45
|
return this.owner.name + "/" + this.name;
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @return {string} name
|
|
50
|
-
*/
|
|
51
|
-
toString() {
|
|
52
|
-
return this.name;
|
|
53
|
-
}
|
|
54
|
-
|
|
47
|
+
|
|
55
48
|
/**
|
|
56
49
|
* Provide name and all defined attributes.
|
|
57
50
|
*/
|
package/src/ref.mjs
CHANGED
|
@@ -191,17 +191,4 @@ export class Ref extends NamedObject {
|
|
|
191
191
|
get isProtected() {
|
|
192
192
|
return false;
|
|
193
193
|
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
*
|
|
197
|
-
* @return true if not {@link isArchived} and {@link isDisabled} and {@link isLocked}
|
|
198
|
-
*/
|
|
199
|
-
get isWritable() {
|
|
200
|
-
return (
|
|
201
|
-
!this.isArchived &&
|
|
202
|
-
!this.isDisabled &&
|
|
203
|
-
!this.isLocked &&
|
|
204
|
-
!this.isProtected
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
194
|
}
|