repository-provider 30.2.0 → 30.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 +1 -1
- package/src/branch.mjs +4 -0
- package/src/issue.mjs +1 -1
- package/src/owned-object.mjs +7 -0
- package/src/project.mjs +2 -1
- package/src/pull-request.mjs +6 -4
- package/src/repository.mjs +4 -0
- package/src/review.mjs +3 -3
package/package.json
CHANGED
package/src/application.mjs
CHANGED
package/src/branch.mjs
CHANGED
|
@@ -20,6 +20,10 @@ export class Branch extends Ref {
|
|
|
20
20
|
static get addMethodName() {
|
|
21
21
|
return "_addBranch";
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
static get collectionName() {
|
|
25
|
+
return "branches";
|
|
26
|
+
}
|
|
23
27
|
|
|
24
28
|
constructor(owner, name = owner.defaultBranchName, options) {
|
|
25
29
|
super(owner, name, options);
|
package/src/issue.mjs
CHANGED
package/src/owned-object.mjs
CHANGED
|
@@ -13,6 +13,13 @@ export class OwnedObject extends NamedObject {
|
|
|
13
13
|
return "_add" + this.name;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @return {string} name of the collection holding ous in the owner
|
|
18
|
+
*/
|
|
19
|
+
static get collectionName() {
|
|
20
|
+
return this.name.toLocaleLowerCase() + "s";
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
constructor(owner, name, options, additionalProperties) {
|
|
17
24
|
super(name, options, {
|
|
18
25
|
...additionalProperties,
|
package/src/project.mjs
CHANGED
package/src/pull-request.mjs
CHANGED
|
@@ -27,11 +27,14 @@ import { BaseProvider } from "./base-provider.mjs";
|
|
|
27
27
|
* @property {string} url
|
|
28
28
|
*/
|
|
29
29
|
export class PullRequest extends OwnedObject {
|
|
30
|
-
|
|
31
30
|
static get addMethodName() {
|
|
32
31
|
return "_addPullRequest";
|
|
33
32
|
}
|
|
34
33
|
|
|
34
|
+
static get collectionName() {
|
|
35
|
+
return "pullRequests";
|
|
36
|
+
}
|
|
37
|
+
|
|
35
38
|
/**
|
|
36
39
|
* All valid states
|
|
37
40
|
* @return {Set<string>} valid states
|
|
@@ -176,8 +179,7 @@ export class PullRequest extends OwnedObject {
|
|
|
176
179
|
});
|
|
177
180
|
}
|
|
178
181
|
|
|
179
|
-
get destination()
|
|
180
|
-
{
|
|
182
|
+
get destination() {
|
|
181
183
|
return this.owner;
|
|
182
184
|
}
|
|
183
185
|
|
|
@@ -193,7 +195,7 @@ export class PullRequest extends OwnedObject {
|
|
|
193
195
|
* URL of the pull request.
|
|
194
196
|
* @return {string} url
|
|
195
197
|
*/
|
|
196
|
-
get url() {
|
|
198
|
+
get url() {
|
|
197
199
|
return `${this.provider.url}${this.repository.fullName}/pull/${this.name}`;
|
|
198
200
|
}
|
|
199
201
|
|
package/src/repository.mjs
CHANGED
package/src/review.mjs
CHANGED