Skip to content

Commit a9a4aea

Browse files
committed
fix: implement batch size
1 parent ae8ced6 commit a9a4aea

File tree

4 files changed

+46
-11
lines changed

4 files changed

+46
-11
lines changed

dist/index.js

Lines changed: 26 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/release.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,23 @@ export class ReleaseTracker {
120120

121121
const releases = await this.fetchReleases(filterredTags)
122122

123-
await this.lcSdk.releaseIssues({
124-
projectId: this.config.projectId,
125-
apps: releases
126-
})
123+
for (const release of releases) {
124+
core.info(`Releasing issues for ${release.appName}@${release.version}`)
125+
126+
const batches = R.chunk(release.issues, 20)
127+
128+
for (const batch of batches) {
129+
await this.lcSdk.releaseIssues({
130+
projectId: this.config.projectId,
131+
apps: [
132+
{
133+
appName: release.appName,
134+
version: release.version,
135+
issues: batch
136+
}
137+
]
138+
})
139+
}
140+
}
127141
}
128142
}

src/sdk/linear-changeset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const LinearChangesetSdkReleaseIssuesBody = object({
66
apps: array(
77
object({
88
appName: string(),
9+
version: string(),
910
issues: array(
1011
object({
11-
version: string(),
1212
issueId: string(),
1313
url: string()
1414
})

0 commit comments

Comments
 (0)