From fee210a14777ee17b6993ec276b7ac768bfd4253 Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Wed, 18 Feb 2026 14:53:47 -0500 Subject: [PATCH 1/2] feat: add ability to configure how many commits we retrieve when iterating through repo history (#2679) * feat: add ability to configure how many commits we retrieve when iterating throgh history * added commit-batch-size to config.json --- docs/manifest-releaser.md | 6 ++++++ schemas/config.json | 5 +++++ src/github.ts | 3 ++- src/manifest.ts | 8 ++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/manifest-releaser.md b/docs/manifest-releaser.md index ee495e5ed..630395848 100644 --- a/docs/manifest-releaser.md +++ b/docs/manifest-releaser.md @@ -268,6 +268,12 @@ defaults (those are documented in comments) // value, but it will increase the number of API calls used. "commit-search-depth": 500, + // Number of commits to fetch per API request when searching commit history. + // This controls the batch size for GraphQL pagination. Lower values result in + // more API calls but may help avoid timeouts. Higher values reduce API calls + // but each request takes longer. Defaults to 10. + "commit-batch-size": 10, + // when creating multiple pull requests or releases, issue GitHub API requests // sequentially rather than concurrently, waiting for the previous request to // complete before issuing the next one. diff --git a/schemas/config.json b/schemas/config.json index 5934e6aa8..2a751312b 100644 --- a/schemas/config.json +++ b/schemas/config.json @@ -431,6 +431,10 @@ "description": "When considering commit history, only look this many commits deep.", "type": "number" }, + "commit-batch-size": { + "description": "Number of commits to fetch per API request when searching commit history. Lower values result in more API calls but may help avoid timeouts. Defaults to 10.", + "type": "number" + }, "sequential-calls": { "description": "Whether to open pull requests/releases sequentially rather than concurrently. If you have many components, you may want to set this to avoid secondary rate limits.", "type": "boolean" @@ -462,6 +466,7 @@ "group-pull-request-title-pattern": true, "release-search-depth": true, "commit-search-depth": true, + "commit-batch-size": true, "sequential-calls": true, "release-type": true, "bump-minor-pre-major": true, diff --git a/src/github.ts b/src/github.ts index 89b1b702d..d99e61b16 100644 --- a/src/github.ts +++ b/src/github.ts @@ -160,6 +160,7 @@ interface ReleaseHistory { interface CommitIteratorOptions { maxResults?: number; backfillFiles?: boolean; + batchSize?: number; } interface ReleaseIteratorOptions { @@ -449,7 +450,7 @@ export class GitHub { cursor, owner: this.repository.owner, repo: this.repository.repo, - num: 10, + num: options.batchSize ?? 10, targetBranch, maxFilesChanged: 100, // max is 100 }; diff --git a/src/manifest.ts b/src/manifest.ts index b58aaaf1a..f0b46a05b 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -215,6 +215,7 @@ export interface ManifestOptions { groupPullRequestTitlePattern?: string; releaseSearchDepth?: number; commitSearchDepth?: number; + commitBatchSize?: number; logger?: Logger; dateFormat?: string; } @@ -270,6 +271,7 @@ export interface ManifestConfig extends ReleaserConfigJson { 'group-pull-request-title-pattern'?: string; 'release-search-depth'?: number; 'commit-search-depth'?: number; + 'commit-batch-size'?: number; 'sequential-calls'?: boolean; 'always-update'?: boolean; } @@ -288,6 +290,7 @@ export const DEFAULT_SNAPSHOT_LABELS = ['autorelease: snapshot']; export const SNOOZE_LABEL = 'autorelease: snooze'; const DEFAULT_RELEASE_SEARCH_DEPTH = 400; const DEFAULT_COMMIT_SEARCH_DEPTH = 500; +const DEFAULT_COMMIT_BATCH_SIZE = 10; export const MANIFEST_PULL_REQUEST_TITLE_PATTERN = 'chore: release ${branch}'; @@ -328,6 +331,7 @@ export class Manifest { private groupPullRequestTitlePattern?: string; readonly releaseSearchDepth: number; readonly commitSearchDepth: number; + readonly commitBatchSize: number; readonly logger: Logger; private pullRequestOverflowHandler: PullRequestOverflowHandler; @@ -397,6 +401,8 @@ export class Manifest { manifestOptions?.releaseSearchDepth || DEFAULT_RELEASE_SEARCH_DEPTH; this.commitSearchDepth = manifestOptions?.commitSearchDepth || DEFAULT_COMMIT_SEARCH_DEPTH; + this.commitBatchSize = + manifestOptions?.commitBatchSize || DEFAULT_COMMIT_BATCH_SIZE; this.logger = manifestOptions?.logger ?? defaultLogger; this.plugins = (manifestOptions?.plugins || []).map(pluginType => buildPlugin({ @@ -626,6 +632,7 @@ export class Manifest { const commitGenerator = this.github.mergeCommitIterator(this.targetBranch, { maxResults: this.commitSearchDepth, backfillFiles: true, + batchSize: this.commitBatchSize, }); const releaseShas = new Set(Object.values(releaseShasByPath)); this.logger.debug(releaseShas); @@ -1468,6 +1475,7 @@ async function parseConfig( extraLabels: configExtraLabel?.split(','), releaseSearchDepth: config['release-search-depth'], commitSearchDepth: config['commit-search-depth'], + commitBatchSize: config['commit-batch-size'], sequentialCalls: config['sequential-calls'], }; return {config: repositoryConfig, options: manifestOptions}; From 891bcf6253b390e39df9ff3e1c059a836bd39c98 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 14:59:20 -0500 Subject: [PATCH 2/2] chore(main): release 17.3.0 (#2680) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- src/index.ts | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 82176e46c..89b579972 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "17.2.1" + ".": "17.3.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f5ae69a5b..30f4f3fc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/release-please?activeTab=versions +## [17.3.0](https://github.com/googleapis/release-please/compare/v17.2.1...v17.3.0) (2026-02-18) + + +### Features + +* add ability to configure how many commits we retrieve when iterating through repo history ([#2679](https://github.com/googleapis/release-please/issues/2679)) ([fee210a](https://github.com/googleapis/release-please/commit/fee210a14777ee17b6993ec276b7ac768bfd4253)) + ## [17.2.1](https://github.com/googleapis/release-please/compare/v17.2.0...v17.2.1) (2026-02-13) diff --git a/package-lock.json b/package-lock.json index 6d041e92a..9d640329c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "release-please", - "version": "17.2.1", + "version": "17.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "release-please", - "version": "17.2.1", + "version": "17.3.0", "license": "Apache-2.0", "dependencies": { "@conventional-commits/parser": "^0.4.1", diff --git a/package.json b/package.json index 5785aaaf9..4ca443faa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "release-please", - "version": "17.2.1", + "version": "17.3.0", "description": "generate release PRs based on the conventionalcommits.org spec", "main": "./build/src/index.js", "bin": "./build/src/bin/release-please.js", diff --git a/src/index.ts b/src/index.ts index a1eceae34..d98b479cd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,5 +63,5 @@ export const configSchema = require('../../schemas/config.json'); export const manifestSchema = require('../../schemas/manifest.json'); // x-release-please-start-version -export const VERSION = '17.2.1'; +export const VERSION = '17.3.0'; // x-release-please-end