repository-provider 28.3.10 → 28.3.11

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.10",
3
+ "version": "28.3.11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -153,11 +153,16 @@ export function RepositoryOwner(base) {
153
153
  let repository = this._repositories.get(normalizedName);
154
154
  if (repository === undefined) {
155
155
  repository = new this.repositoryClass(this, name, options);
156
- this._repositories.set(normalizedName, repository);
157
156
  }
158
157
  return repository;
159
158
  }
160
159
 
160
+ _addRepository(repository)
161
+ {
162
+ const normalizedName = this.normalizeRepositoryName(repository.name, true);
163
+ this._repositories.set(normalizedName, repository);
164
+ }
165
+
161
166
  /**
162
167
  * Delete a repository.
163
168
  * @param {string} name
@@ -1,6 +1,6 @@
1
1
  import { matcher } from "matching-iterator";
2
2
  import { optionJSON } from "./attribute.mjs";
3
- import { NamedObject } from "./named-object.mjs";
3
+ import { OwnedObject } from "./owned-object.mjs";
4
4
  import { Hook } from "./hook.mjs";
5
5
  import { Tag } from "./tag.mjs";
6
6
  import { Branch } from "./branch.mjs";
@@ -24,7 +24,12 @@ import { BaseProvider } from "./base-provider.mjs";
24
24
  * @property {Map<string,PullRequest>} pullRequests
25
25
  * @property {Map<string,Milestone>} milestones
26
26
  */
27
- export class Repository extends NamedObject {
27
+ export class Repository extends OwnedObject {
28
+
29
+ static get registerInstanceMethodName() {
30
+ return "_addRepository";
31
+ }
32
+
28
33
  /**
29
34
  * options
30
35
  */
@@ -62,8 +67,7 @@ export class Repository extends NamedObject {
62
67
  }
63
68
 
64
69
  constructor(owner, name, options) {
65
- super(owner.normalizeRepositoryName(name, false), options, {
66
- owner: { value: owner },
70
+ super(owner, owner.normalizeRepositoryName(name, false), options, {
67
71
  _branches: { value: new Map() },
68
72
  _tags: { value: new Map() },
69
73
  _pullRequests: { value: new Map() },