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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "28.3.6",
3
+ "version": "28.3.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -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
  }
@@ -428,10 +428,6 @@ export class BaseProvider extends BaseObject {
428
428
  return "/";
429
429
  }
430
430
 
431
- toString() {
432
- return this.name;
433
- }
434
-
435
431
  /**
436
432
  * List all defined entries from attributes.
437
433
  * return {object}
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
@@ -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
  }
package/src/tag.mjs CHANGED
@@ -15,13 +15,4 @@ export class Tag extends Ref {
15
15
  get refType() {
16
16
  return "tags";
17
17
  }
18
-
19
- /**
20
- * Tags cannot be written to.
21
- * @return {boolean} false
22
- */
23
- get isWritable()
24
- {
25
- return false;
26
- }
27
18
  }