Skip to content

fix: reuse single Manifest instance for releases and pull requests#41

Merged
yafanasiev merged 1 commit intorelease-please-oss:mainfrom
omerarslan0:fix/reuse-manifest-instance
Apr 22, 2026
Merged

fix: reuse single Manifest instance for releases and pull requests#41
yafanasiev merged 1 commit intorelease-please-oss:mainfrom
omerarslan0:fix/reuse-manifest-instance

Conversation

@omerarslan0
Copy link
Copy Markdown
Contributor

The main() function instantiated two separate Manifest objects: one for creating releases and another for creating pull requests. Each call to loadOrBuildManifest() triggers GitHub API requests to fetch repository configuration and release history.

When draft: true is enabled this redundancy becomes especially costly because draft release resolution requires iterating through more GitHub API pages to find tagged releases, effectively doubling the API overhead.

This PR hoists the loadOrBuildManifest() call above both conditional blocks so a single, shared instance is used for both operations.

Originally opened against the upstream googleapis/release-please-action in #1190; rebased here per maintainer request.

Test plan

  • npm test passes
  • npm run build regenerates dist/index.js
  • npm run lint and npm run fmt:check pass

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yafanasiev
Copy link
Copy Markdown
Contributor

@omerarslan0 thank you!

@yafanasiev yafanasiev merged commit 6be9b2e into release-please-oss:main Apr 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants