repository-provider 32.7.21 → 32.7.23

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": "32.7.21",
3
+ "version": "32.7.23",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "devDependencies": {
36
36
  "ava": "^5.3.0",
37
- "browser-ava": "^1.3.44",
37
+ "browser-ava": "^1.3.47",
38
38
  "c8": "^7.14.0",
39
39
  "documentation": "^14.0.2",
40
- "repository-provider-test-support": "^2.3.7",
41
- "semantic-release": "^21.0.3s",
40
+ "repository-provider-test-support": "^2.3.8",
41
+ "semantic-release": "^21.0.5",
42
42
  "typescript": "^5.1.3"
43
43
  },
44
44
  "engines": {
package/src/commit.mjs CHANGED
@@ -17,6 +17,9 @@ export class User
17
17
  * @property {User} committer
18
18
  */
19
19
  export class Commit {
20
+
21
+ repository;
22
+
20
23
  constructor(repository) {
21
24
  this.repository = repository;
22
25
  }
@@ -22,6 +22,8 @@ export class OwnedObject extends NamedObject {
22
22
  return "_delete" + this.name;
23
23
  }
24
24
 
25
+ owner;
26
+
25
27
  constructor(owner, name, options, additionalProperties) {
26
28
  super(name, options, additionalProperties);
27
29
  this.owner = owner;
@@ -44,6 +46,48 @@ export class OwnedObject extends NamedObject {
44
46
  return super.equals(other) && this.owner.equals(other.owner);
45
47
  }
46
48
 
49
+ /**
50
+ * Url of home page.
51
+ * @see {@link Repository#homePageURL}
52
+ * @return {string} as provided from the owner
53
+ */
54
+ get homePageURL() {
55
+ return this.owner.homePageURL;
56
+ }
57
+
58
+ /**
59
+ * Url of issue tracking system.
60
+ * @see {@link Repository#issuesURL}
61
+ * @return {string} as provided from the repository
62
+ */
63
+ get issuesURL() {
64
+ return this.owner.issuesURL;
65
+ }
66
+
67
+ /**
68
+ * Forwarded from the owner.
69
+ * @return {boolean}
70
+ */
71
+ get isLocked() {
72
+ return this.owner.isLocked;
73
+ }
74
+
75
+ /**
76
+ * Forwarded from the owner.
77
+ * @return {boolean}
78
+ */
79
+ get isArchived() {
80
+ return this.owner.isArchived;
81
+ }
82
+
83
+ /**
84
+ * Forwarded from the owner.
85
+ * @return {boolean}
86
+ */
87
+ get isDisabled() {
88
+ return this.owner.isDisabled;
89
+ }
90
+
47
91
  /**
48
92
  * API as given by the owner.
49
93
  * @return {string} url
@@ -80,9 +124,9 @@ export class OwnedObject extends NamedObject {
80
124
  * @return {string} name with owner name
81
125
  */
82
126
  get fullName() {
83
- return this.owner === this.provider || this.owner.name === undefined
84
- ? this.name
85
- : this.owner.name + "/" + this.name;
127
+ return this.owner === this.provider || this.owner.name === undefined
128
+ ? this.name
129
+ : this.owner.name + "/" + this.name;
86
130
  }
87
131
 
88
132
  /**
package/src/ref.mjs CHANGED
@@ -128,44 +128,6 @@ export class Ref extends OwnedObject {
128
128
  : `${this.owner.identifier}#${this.name}`;
129
129
  }
130
130
 
131
- /**
132
- * Url of issue tracking system.
133
- * @see {@link Repository#issuesURL}
134
- * @return {string} as provided from the repository
135
- */
136
- get issuesURL() {
137
- return this.owner.issuesURL;
138
- }
139
-
140
- /**
141
- * Url of home page.
142
- * @see {@link Repository#homePageURL}
143
- * @return {string} as provided from the repository
144
- */
145
- get homePageURL() {
146
- return this.owner.homePageURL;
147
- }
148
-
149
- /**
150
- * Forwarded from the repository
151
- */
152
- get isLocked() {
153
- return this.owner.isLocked;
154
- }
155
-
156
- /**
157
- * Forwarded from the repository
158
- */
159
- get isArchived() {
160
- return this.owner.isArchived;
161
- }
162
-
163
- /**
164
- * Forwarded from the repository
165
- */
166
- get isDisabled() {
167
- return this.owner.isDisabled;
168
- }
169
131
 
170
132
  /**
171
133
  *
@@ -220,7 +220,7 @@ export class Repository extends OwnedObject {
220
220
  */
221
221
  async branch(name) {
222
222
  if (name === this.defaultBranchName) {
223
- return this.#branches.get(name) || this.addBranch(name);
223
+ return this.addBranch(name);
224
224
  }
225
225
 
226
226
  await this.initializeBranches();