repository-provider 31.1.2 → 31.2.1
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 +2 -2
- package/src/base-object.mjs +2 -2
- package/src/named-object.mjs +2 -1
- package/src/pull-request.mjs +9 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "31.1
|
|
3
|
+
"version": "31.2.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"ava": "^4.2.0",
|
|
37
37
|
"c8": "^7.11.3",
|
|
38
38
|
"documentation": "^13.2.5",
|
|
39
|
-
"repository-provider-test-support": "^2.1.
|
|
39
|
+
"repository-provider-test-support": "^2.1.26",
|
|
40
40
|
"semantic-release": "^19.0.2",
|
|
41
41
|
"typescript": "^4.7.2"
|
|
42
42
|
},
|
package/src/base-object.mjs
CHANGED
|
@@ -38,13 +38,13 @@ export class BaseObject {
|
|
|
38
38
|
* Unique id within the provider.
|
|
39
39
|
* @return {string}
|
|
40
40
|
*/
|
|
41
|
-
id: { type: "string" },
|
|
41
|
+
id: { isKey: true, type: "string" },
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Unique id.
|
|
45
45
|
* @return {string}
|
|
46
46
|
*/
|
|
47
|
-
uuid: { type: "string" }
|
|
47
|
+
uuid: { isKey: true, type: "string" }
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
|
package/src/named-object.mjs
CHANGED
package/src/pull-request.mjs
CHANGED
|
@@ -153,7 +153,7 @@ export class PullRequest extends OwnedObject {
|
|
|
153
153
|
},
|
|
154
154
|
|
|
155
155
|
url: {
|
|
156
|
-
type: "
|
|
156
|
+
type: "url"
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
}
|
|
@@ -277,12 +277,16 @@ export class PullRequest extends OwnedObject {
|
|
|
277
277
|
[this.name, this.title],
|
|
278
278
|
["source", this.source.identifier],
|
|
279
279
|
["destination", this.owner.identifier],
|
|
280
|
-
...Object.
|
|
280
|
+
...Object.entries(this.constructor.attributes)
|
|
281
281
|
.filter(
|
|
282
|
-
k =>
|
|
283
|
-
|
|
282
|
+
([k, v]) =>
|
|
283
|
+
!v.isKey &&
|
|
284
|
+
v.type !== "url" &&
|
|
285
|
+
k !== "title" &&
|
|
286
|
+
k !== "body" &&
|
|
287
|
+
this[k] !== undefined
|
|
284
288
|
)
|
|
285
|
-
.map(k => [k, this[k]])
|
|
289
|
+
.map(([k]) => [k, this[k]])
|
|
286
290
|
]
|
|
287
291
|
.map(([k, v]) => `${k}: ${v}`)
|
|
288
292
|
.join(", ");
|