repository-provider 32.3.16 → 32.3.17
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/attributes.mjs +6 -1
- package/src/hook.mjs +2 -2
- package/src/named-object.mjs +2 -2
- package/src/pull-request.mjs +4 -15
- package/src/repository-group.mjs +2 -2
- package/src/repository.mjs +7 -7
package/package.json
CHANGED
package/src/attributes.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export const boolean_attribute = {
|
|
2
|
+
type: "boolean",
|
|
3
|
+
default: false,
|
|
4
|
+
writable: true
|
|
5
|
+
};
|
|
6
|
+
|
|
1
7
|
export const url = { description: "home of the object", type: "url" };
|
|
2
8
|
|
|
3
9
|
/**
|
|
@@ -52,7 +58,6 @@ export const priority = {
|
|
|
52
58
|
writable: true
|
|
53
59
|
};
|
|
54
60
|
|
|
55
|
-
|
|
56
61
|
export const active = { type: "boolean", default: true, writable: true };
|
|
57
62
|
export const size = { type: "integer" };
|
|
58
63
|
export const language = { type: "string" };
|
package/src/hook.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OwnedObject } from "./owned-object.mjs";
|
|
2
|
-
import { secret, active, url } from "./attributes.mjs";
|
|
2
|
+
import { secret, active, url, boolean_attribute } from "./attributes.mjs";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Repository hook.
|
|
@@ -12,7 +12,7 @@ export class Hook extends OwnedObject {
|
|
|
12
12
|
secret,
|
|
13
13
|
url: { ...url, description: "target url", writable: true },
|
|
14
14
|
content_type: { type: "string", default: "json", writable: true },
|
|
15
|
-
insecure_ssl:
|
|
15
|
+
insecure_ssl: boolean_attribute,
|
|
16
16
|
events: { type: "set", default: new Set(["*"]) }
|
|
17
17
|
};
|
|
18
18
|
}
|
package/src/named-object.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { optionJSON } from "./attribute.mjs";
|
|
2
2
|
import { BaseObject } from "./base-object.mjs";
|
|
3
|
-
import { name } from "./attributes.mjs";
|
|
3
|
+
import { name, url } from "./attributes.mjs";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Object with a name.
|
|
@@ -23,7 +23,7 @@ export class NamedObject extends BaseObject {
|
|
|
23
23
|
* The url of home page.
|
|
24
24
|
* @return {string}
|
|
25
25
|
*/
|
|
26
|
-
homePageURL: {
|
|
26
|
+
homePageURL: { ...url, writable: true }
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
|
package/src/pull-request.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { OwnedObject } from "./owned-object.mjs";
|
|
|
3
3
|
import { Branch } from "./branch.mjs";
|
|
4
4
|
import { Repository } from "./repository.mjs";
|
|
5
5
|
import { Review } from "./review.mjs";
|
|
6
|
-
import { url, state, body, title } from "./attributes.mjs";
|
|
6
|
+
import { url, state, body, title, boolean_attribute } from "./attributes.mjs";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Abstract pull request.
|
|
@@ -110,30 +110,19 @@ export class PullRequest extends OwnedObject {
|
|
|
110
110
|
* Locked state of the pull request.
|
|
111
111
|
* @return {boolean}
|
|
112
112
|
*/
|
|
113
|
-
locked:
|
|
114
|
-
type: "boolean",
|
|
115
|
-
default: false,
|
|
116
|
-
writable: true
|
|
117
|
-
},
|
|
113
|
+
locked: boolean_attribute,
|
|
118
114
|
|
|
119
115
|
/**
|
|
120
116
|
* Merged state of the pull request.
|
|
121
117
|
* @return {boolean}
|
|
122
118
|
*/
|
|
123
|
-
merged:
|
|
124
|
-
type: "boolean",
|
|
125
|
-
default: false,
|
|
126
|
-
writable: true
|
|
127
|
-
},
|
|
119
|
+
merged: boolean_attribute,
|
|
128
120
|
|
|
129
121
|
/**
|
|
130
122
|
* Draft state of the pull request.
|
|
131
123
|
* @return {boolean}
|
|
132
124
|
*/
|
|
133
|
-
draft:
|
|
134
|
-
type: "boolean",
|
|
135
|
-
default: false
|
|
136
|
-
},
|
|
125
|
+
draft: boolean_attribute,
|
|
137
126
|
|
|
138
127
|
dry: {
|
|
139
128
|
type: "boolean",
|
package/src/repository-group.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RepositoryOwner } from "./repository-owner.mjs";
|
|
2
2
|
import { OwnedObject } from "./owned-object.mjs";
|
|
3
3
|
import { BaseProvider } from "./base-provider.mjs";
|
|
4
|
-
import { url } from "./attributes.mjs";
|
|
4
|
+
import { url, boolean_attribute } from "./attributes.mjs";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Abstract repository collection.
|
|
@@ -49,7 +49,7 @@ export class RepositoryGroup extends RepositoryOwner(OwnedObject) {
|
|
|
49
49
|
*/
|
|
50
50
|
avatarURL: { ...url },
|
|
51
51
|
|
|
52
|
-
isAdmin:
|
|
52
|
+
isAdmin: boolean_attribute
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
|
package/src/repository.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { Hook } from "./hook.mjs";
|
|
|
4
4
|
import { Tag } from "./tag.mjs";
|
|
5
5
|
import { Branch } from "./branch.mjs";
|
|
6
6
|
import { PullRequest } from "./pull-request.mjs";
|
|
7
|
-
import { url, size, language } from "./attributes.mjs";
|
|
7
|
+
import { url, size, language, boolean_attribute } from "./attributes.mjs";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Abstract repository
|
|
@@ -48,17 +48,17 @@ export class Repository extends OwnedObject {
|
|
|
48
48
|
*/
|
|
49
49
|
defaultBranchName: { type: "string", default: "master" },
|
|
50
50
|
|
|
51
|
-
cloneURL:
|
|
51
|
+
cloneURL: url,
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* The url of issue tracking system.
|
|
55
55
|
* @return {string}
|
|
56
56
|
*/
|
|
57
|
-
issuesURL:
|
|
58
|
-
isArchived:
|
|
59
|
-
isLocked:
|
|
60
|
-
isDisabled:
|
|
61
|
-
isTemplate:
|
|
57
|
+
issuesURL: url,
|
|
58
|
+
isArchived: boolean_attribute,
|
|
59
|
+
isLocked: boolean_attribute,
|
|
60
|
+
isDisabled: boolean_attribute,
|
|
61
|
+
isTemplate: boolean_attribute,
|
|
62
62
|
isFork: { type: "boolean", default: false }
|
|
63
63
|
};
|
|
64
64
|
}
|