repository-provider 28.2.1 → 28.3.0
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 +1 -1
- package/src/application.mjs +2 -10
- package/src/base-provider.mjs +1 -0
- package/src/index.mjs +1 -0
- package/src/issue.mjs +2 -11
- package/src/milestone.mjs +2 -10
- package/src/owned-object.mjs +23 -0
- package/src/project.mjs +3 -10
- package/src/ref.mjs +1 -1
package/package.json
CHANGED
package/src/application.mjs
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OwnedObject } from "./owned-object.mjs";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
export class Application extends
|
|
7
|
-
|
|
8
|
-
constructor(owner, name, options) {
|
|
9
|
-
super(name, options, {
|
|
10
|
-
owner: { value: owner }
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
owner._addApplication(this);
|
|
14
|
-
}
|
|
6
|
+
export class Application extends OwnedObject {
|
|
15
7
|
}
|
package/src/base-provider.mjs
CHANGED
package/src/index.mjs
CHANGED
package/src/issue.mjs
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OwnedObject } from "./owned-object.mjs";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
export class Issue extends
|
|
7
|
-
|
|
8
|
-
constructor(owner, name, options) {
|
|
9
|
-
super(name, options, {
|
|
10
|
-
owner: { value: owner }
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
owner._addIssue(this);
|
|
14
|
-
}
|
|
15
|
-
|
|
6
|
+
export class Issue extends OwnedObject {
|
|
16
7
|
async *labels() {}
|
|
17
8
|
async *assignees() {}
|
|
18
9
|
async assignee() {}
|
package/src/milestone.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OwnedObject } from "./owned-object.mjs";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
*/
|
|
5
|
-
export class Milestone extends
|
|
5
|
+
export class Milestone extends OwnedObject {
|
|
6
6
|
static get attributes() {
|
|
7
7
|
return {
|
|
8
8
|
...super.attributes,
|
|
@@ -10,13 +10,5 @@ export class Milestone extends NamedObject {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
constructor(owner, name, options) {
|
|
14
|
-
super(name, options, {
|
|
15
|
-
owner: { value: owner }
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
owner._addMilestone(this);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
13
|
async *issues() {}
|
|
22
14
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NamedObject } from "./named-object.mjs";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Named Object registering itself in the owner.
|
|
5
|
+
*/
|
|
6
|
+
export class OwnedObject extends NamedObject {
|
|
7
|
+
/**
|
|
8
|
+
* Method name to be called to register one instance in the owner.
|
|
9
|
+
* sample: Application => _addApplication
|
|
10
|
+
* @return {string}
|
|
11
|
+
*/
|
|
12
|
+
static get registerInstanceMethodName() {
|
|
13
|
+
return "_add" + this.name;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
constructor(owner, name, options) {
|
|
17
|
+
super(name, options, {
|
|
18
|
+
owner: { value: owner }
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
owner[this.constructor.registerInstanceMethodName](this);
|
|
22
|
+
}
|
|
23
|
+
}
|
package/src/project.mjs
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OwnedObject } from "./owned-object.mjs";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
*
|
|
5
5
|
*/
|
|
6
|
-
export class Project extends
|
|
7
|
-
constructor(owner, name, options) {
|
|
8
|
-
super(name, options, {
|
|
9
|
-
owner: { value: owner }
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
owner._addProject(this);
|
|
13
|
-
}}
|
|
6
|
+
export class Project extends OwnedObject {}
|
package/src/ref.mjs
CHANGED
|
@@ -120,7 +120,7 @@ export class Ref extends NamedObject {
|
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
* Repository fullName and branch name combined.
|
|
123
|
-
* But skipping the branch name if it is the default branch
|
|
123
|
+
* But skipping the branch name if it is the default branch.
|
|
124
124
|
* @return {string} 'user/repo#branch'
|
|
125
125
|
*/
|
|
126
126
|
get fullCondensedName() {
|