repository-provider 32.7.20 → 32.7.22

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.20",
3
+ "version": "32.7.22",
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.6",
41
- "semantic-release": "^21.0.3s",
40
+ "repository-provider-test-support": "^2.3.7",
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;
@@ -63,7 +63,10 @@ export class Repository extends OwnedObject {
63
63
  * The name of the default branch
64
64
  * @return {string}
65
65
  */
66
- defaultBranchName: { ...default_attribute, default: Repository.defaultBranchName },
66
+ defaultBranchName: {
67
+ ...default_attribute,
68
+ default: Repository.defaultBranchName
69
+ },
67
70
 
68
71
  cloneURL: url_attribute,
69
72
 
@@ -99,8 +102,7 @@ export class Repository extends OwnedObject {
99
102
  return `${this.provider.url}${this.slug}`;
100
103
  }
101
104
 
102
- get defaultBranchName()
103
- {
105
+ get defaultBranchName() {
104
106
  return Repository.defaultBranchName;
105
107
  }
106
108
 
@@ -218,7 +220,7 @@ export class Repository extends OwnedObject {
218
220
  */
219
221
  async branch(name) {
220
222
  if (name === this.defaultBranchName) {
221
- return this.#branches.get(name) || this.addBranch(name);
223
+ return this.addBranch(name);
222
224
  }
223
225
 
224
226
  await this.initializeBranches();
@@ -265,10 +267,7 @@ export class Repository extends OwnedObject {
265
267
  addBranch(name, options) {
266
268
  const branch = this.#branches.get(name);
267
269
  if (branch) {
268
- if (options) {
269
- branch.updateAttributes(options);
270
- }
271
-
270
+ branch.updateAttributes(options);
272
271
  return branch;
273
272
  }
274
273