repository-provider 28.3.12 → 28.3.13

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.12",
3
+ "version": "28.3.13",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/branch.mjs CHANGED
@@ -21,8 +21,8 @@ export class Branch extends Ref {
21
21
  return "_addBranch";
22
22
  }
23
23
 
24
- constructor(repository, name = repository.defaultBranchName, options) {
25
- super(repository, name, options);
24
+ constructor(owner, name = owner.defaultBranchName, options) {
25
+ super(owner, name, options);
26
26
  }
27
27
 
28
28
  /**
@@ -31,8 +31,8 @@ export class Branch extends Ref {
31
31
  */
32
32
  get url() {
33
33
  return this.isDefault
34
- ? this.repository.url
35
- : `${this.repository.url}#${this.name}`;
34
+ ? this.owner.url
35
+ : `${this.owner.url}#${this.name}`;
36
36
  }
37
37
 
38
38
  /**
@@ -60,7 +60,7 @@ export class Branch extends Ref {
60
60
  * @return {boolean} true if name matches the repository default branch
61
61
  */
62
62
  get isDefault() {
63
- return this.name === this.repository.defaultBranchName;
63
+ return this.name === this.owner.defaultBranchName;
64
64
  }
65
65
 
66
66
  /**
@@ -69,7 +69,7 @@ export class Branch extends Ref {
69
69
  * @return {Promise<any>}
70
70
  */
71
71
  async delete() {
72
- return this.repository.deleteBranch(this.name);
72
+ return this.owner.deleteBranch(this.name);
73
73
  }
74
74
 
75
75
  /**
@@ -191,6 +191,6 @@ export class Branch extends Ref {
191
191
  * @return {Promise<Branch>} newly created branch (or already present old one with the same name)
192
192
  */
193
193
  async createBranch(name, options) {
194
- return this.repository.createBranch(name, this, options);
194
+ return this.owner.createBranch(name, this, options);
195
195
  }
196
196
  }
@@ -20,7 +20,7 @@ export class NamedObject extends BaseObject {
20
20
  /**
21
21
  * Check for equality.
22
22
  * @param {NamedObject} other
23
- * @return {boolean} true if names are equal and have the same owner
23
+ * @return {boolean} true if names are equal and have the same provider
24
24
  */
25
25
  equals(other) {
26
26
  return (
@@ -37,7 +37,7 @@ export class NamedObject extends BaseObject {
37
37
  }
38
38
 
39
39
  /**
40
- * Provide name and all defined attributes.
40
+ * Provided name and all defined attributes.
41
41
  */
42
42
  toJSON() {
43
43
  return optionJSON(this, {