repository-provider 32.3.13 → 32.3.15

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": "32.3.13",
3
+ "version": "32.3.15",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,9 +1,7 @@
1
1
  export const url = { description: "home of the object", type: "url" };
2
2
 
3
-
4
3
  /**
5
4
  * The description of the object content.
6
- * @return {string}
7
5
  */
8
6
  export const description = {
9
7
  type: "string",
@@ -15,21 +13,46 @@ export const name = {
15
13
  type: "string",
16
14
  isKey: true
17
15
  };
18
-
16
+
19
17
  /**
20
18
  * Unique id within the provider.
21
- * @return {string}
22
19
  */
23
20
  export const id = { isKey: true, type: "string" };
24
21
 
25
22
  /**
26
23
  * Unique id.
27
- * @return {string}
28
24
  */
29
25
  export const uuid = { isKey: true, type: "string" };
30
26
 
31
-
32
27
  export const state = { type: "string" };
33
28
 
34
29
  export const secret = { type: "string", private: true, writable: true };
35
-
30
+
31
+ /**
32
+ * The description of the pull request.
33
+ */
34
+ export const body = { type: "string", writable: true };
35
+
36
+ /**
37
+ * The one line description of the pull request.
38
+ */
39
+ export const title = {
40
+ type: "string",
41
+ description: "human readable title",
42
+ writable: true
43
+ };
44
+
45
+ /**
46
+ * In case there are several providers able to support a given source which one sould be used ?
47
+ * this defines the order
48
+ */
49
+ export const priority = {
50
+ type: "number",
51
+ default: 0,
52
+ writable: true
53
+ };
54
+
55
+
56
+ export const active = { type: "boolean", default: true, writable: true };
57
+ export const size = { type: "integer" };
58
+ export const language = { type: "string" };
@@ -8,7 +8,7 @@ import { Hook } from "./hook.mjs";
8
8
  import { Project } from "./project.mjs";
9
9
  import { Milestone } from "./milestone.mjs";
10
10
  import { BaseObject } from "./base-object.mjs";
11
- import { url, name, description } from "./attributes.mjs";
11
+ import { url, name, description, priority } from "./attributes.mjs";
12
12
 
13
13
  /**
14
14
  * @typedef {Object} MessageDestination
@@ -23,7 +23,6 @@ import { url, name, description } from "./attributes.mjs";
23
23
  * @property {MessageDestination} messageDestination
24
24
  */
25
25
  export class BaseProvider extends BaseObject {
26
-
27
26
  static get type() {
28
27
  return "provider";
29
28
  }
@@ -67,7 +66,7 @@ export class BaseProvider extends BaseObject {
67
66
  options = {};
68
67
  }
69
68
 
70
- if(options[name] === undefined) {
69
+ if (options[name] === undefined) {
71
70
  options[name] = value;
72
71
  Object.assign(options, attribute.additionalAttributes);
73
72
  }
@@ -100,15 +99,7 @@ export class BaseProvider extends BaseObject {
100
99
  return {
101
100
  url,
102
101
  description,
103
-
104
- /**
105
- * In case there are several providers able to support a given source which one sould be used ?
106
- * this defines the order
107
- */
108
- priority: {
109
- type: "number",
110
- default: 0
111
- },
102
+ priority,
112
103
 
113
104
  /**
114
105
  * Name of the provider.
@@ -117,7 +108,7 @@ export class BaseProvider extends BaseObject {
117
108
  ...name,
118
109
  env: ["{{instanceIdentifier}}NAME"]
119
110
  },
120
-
111
+
121
112
  /**
122
113
  * To forward info/warn and error messages to
123
114
  */
package/src/hook.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { OwnedObject } from "./owned-object.mjs";
2
- import { secret, url } from "./attributes.mjs";
2
+ import { secret, active, url } from "./attributes.mjs";
3
3
 
4
4
  /**
5
5
  * Repository hook.
@@ -8,11 +8,11 @@ export class Hook extends OwnedObject {
8
8
  static get attributes() {
9
9
  return {
10
10
  ...super.attributes,
11
- url: { ...url, description: "target url", writable: true },
11
+ active,
12
12
  secret,
13
+ url: { ...url, description: "target url", writable: true },
13
14
  content_type: { type: "string", default: "json", writable: true },
14
15
  insecure_ssl: { type: "boolean", default: false },
15
- active: { type: "boolean", default: true, writable: true },
16
16
  events: { type: "set", default: new Set(["*"]) }
17
17
  };
18
18
  }
@@ -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 } from "./attributes.mjs";
6
+ import { url, state, body, title } from "./attributes.mjs";
7
7
 
8
8
  /**
9
9
  * Abstract pull request.
@@ -89,18 +89,10 @@ export class PullRequest extends OwnedObject {
89
89
  static get attributes() {
90
90
  return {
91
91
  ...super.attributes,
92
- /**
93
- * The one line description of the pull request.
94
- * @return {string}
95
- */
96
- title: { type: "string", writable: true },
97
-
98
- /**
99
- * The description of the pull request.
100
- * @return {string}
101
- */
102
- body: { type: "string", writable: true },
103
-
92
+ body,
93
+ title,
94
+ url,
95
+
104
96
  /**
105
97
  * state of the pull request.
106
98
  * - OPEN
@@ -150,9 +142,7 @@ export class PullRequest extends OwnedObject {
150
142
 
151
143
  empty: {
152
144
  type: "boolean"
153
- },
154
-
155
- url
145
+ }
156
146
  };
157
147
  }
158
148
 
@@ -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 } from "./attributes.mjs";
7
+ import { url, size, language } from "./attributes.mjs";
8
8
 
9
9
  /**
10
10
  * Abstract repository
@@ -24,11 +24,10 @@ import { url } from "./attributes.mjs";
24
24
  * @property {Map<string,Milestone>} milestones
25
25
  */
26
26
  export class Repository extends OwnedObject {
27
-
28
27
  static get addMethodName() {
29
28
  return "_addRepository";
30
29
  }
31
-
30
+
32
31
  static get collectionName() {
33
32
  return "repositories";
34
33
  }
@@ -39,6 +38,9 @@ export class Repository extends OwnedObject {
39
38
  static get attributes() {
40
39
  return {
41
40
  ...super.attributes,
41
+ url,
42
+ size,
43
+ language,
42
44
 
43
45
  /**
44
46
  * The name of the default branch
@@ -46,12 +48,6 @@ export class Repository extends OwnedObject {
46
48
  */
47
49
  defaultBranchName: { type: "string", default: "master" },
48
50
 
49
- /**
50
- * URL of the repository
51
- * @return {string}
52
- */
53
- url,
54
-
55
51
  cloneURL: { ...url },
56
52
 
57
53
  /**
@@ -59,8 +55,6 @@ export class Repository extends OwnedObject {
59
55
  * @return {string}
60
56
  */
61
57
  issuesURL: { ...url },
62
- size: { type: "integer" },
63
- language: { type: "string" },
64
58
  isArchived: { type: "boolean", default: false, writable: true },
65
59
  isLocked: { type: "boolean", default: false },
66
60
  isDisabled: { type: "boolean", default: false },