comfy-pr 0.2.7 → 0.2.8
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/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/CRNodes.ts +1 -0
- package/src/updateCNReposCRPullsComments.ts +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.2.8](https://github.com/drip-art/Comfy-Registry-PR/compare/v0.2.7...v0.2.8) (2024-06-20)
|
|
6
|
+
|
|
5
7
|
### [0.2.7](https://github.com/drip-art/Comfy-Registry-PR/compare/v0.2.5...v0.2.7) (2024-06-20)
|
|
6
8
|
|
|
7
9
|
### Features
|
package/package.json
CHANGED
package/src/CRNodes.ts
CHANGED
|
@@ -14,6 +14,7 @@ export type CRNode = Awaited<ReturnType<typeof fetchCRNodes>>[number] & {
|
|
|
14
14
|
export const CRNodes = db.collection<CRNode>("CRNodes");
|
|
15
15
|
await CRNodes.createIndex({ id: 1 }, { unique: true });
|
|
16
16
|
await CRNodes.createIndex({ repository: 1 }, { unique: false }); // WARN: duplicate is allowed
|
|
17
|
+
|
|
17
18
|
if (import.meta.main) {
|
|
18
19
|
const r = await pMap(
|
|
19
20
|
$pipeline(CNRepos)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import pMap from "p-map";
|
|
2
|
-
import { peekYaml } from "peek-log";
|
|
3
2
|
import { CNRepos, type CRPull } from "./CNRepos";
|
|
4
3
|
import { $fresh, $stale } from "./db";
|
|
5
4
|
// import { $filaten } from "./db";
|
|
@@ -28,13 +27,13 @@ export async function updateCNReposCRPullsComments() {
|
|
|
28
27
|
const { repository, pull } = data as unknown as { repository: string } & CRPull;
|
|
29
28
|
const html_url = pull.html_url;
|
|
30
29
|
const comments = await fetchIssueComments(repository, pull).then(TaskOK).catch(TaskError);
|
|
31
|
-
return
|
|
30
|
+
return [
|
|
32
31
|
await CNRepos.findOneAndUpdate(
|
|
33
32
|
$filaten({ repository, crPulls: { data: { pull: { html_url } } } }),
|
|
34
33
|
{ $set: { "crPulls.data.$.comments": comments } },
|
|
35
34
|
{ upsert: true, returnDocument: "after" },
|
|
36
35
|
),
|
|
37
|
-
]
|
|
36
|
+
];
|
|
38
37
|
},
|
|
39
38
|
{ concurrency: 2 },
|
|
40
39
|
);
|