release-please 14.13.0 → 14.13.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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/release-please?activeTab=versions
6
6
 
7
+ ## [14.13.1](https://github.com/googleapis/release-please/compare/v14.13.0...v14.13.1) (2022-10-14)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * Updating a pull request uses overflow handler if body is too large ([#1702](https://github.com/googleapis/release-please/issues/1702)) ([f328511](https://github.com/googleapis/release-please/commit/f3285115a9c0e4a199f86038319bafd6d604d96a))
13
+
7
14
  ## [14.13.0](https://github.com/googleapis/release-please/compare/v14.12.0...v14.13.0) (2022-10-13)
8
15
 
9
16
 
package/README.md CHANGED
@@ -12,6 +12,9 @@ It does so by parsing your
12
12
  git history, looking for [Conventional Commit messages](https://www.conventionalcommits.org/),
13
13
  and creating release PRs.
14
14
 
15
+ It does not handle publication to package managers or handle complex branch
16
+ management.
17
+
15
18
  ## What's a Release PR?
16
19
 
17
20
  Rather than continuously releasing what's landed to your default branch,
@@ -11,6 +11,7 @@ import { Update } from './update';
11
11
  import { Release } from './release';
12
12
  import { GitHubFileContents } from '@google-automations/git-file-utils';
13
13
  import { Logger } from 'code-suggester/build/src/types';
14
+ import { PullRequestOverflowHandler } from './util/pull-request-overflow-handler';
14
15
  declare type RequestBuilderType = typeof request;
15
16
  declare type DefaultFunctionType = RequestBuilderType['defaults'];
16
17
  declare type RequestFunctionType = ReturnType<DefaultFunctionType>;
@@ -319,11 +320,17 @@ export declare class GitHub {
319
320
  * Update a pull request's title and body.
320
321
  * @param {number} number The pull request number
321
322
  * @param {ReleasePullRequest} releasePullRequest Pull request data to update
322
- * @param {}
323
+ * @param {string} targetBranch The target branch of the pull request
324
+ * @param {string} options.signoffUser Optional. Commit signoff message
325
+ * @param {boolean} options.fork Optional. Whether to open the pull request from
326
+ * a fork or not. Defaults to `false`
327
+ * @param {PullRequestOverflowHandler} options.pullRequestOverflowHandler Optional.
328
+ * Handles extra large pull request body messages.
323
329
  */
324
330
  updatePullRequest: (number: number, releasePullRequest: ReleasePullRequest, targetBranch: string, options?: {
325
331
  signoffUser?: string | undefined;
326
332
  fork?: boolean | undefined;
333
+ pullRequestOverflowHandler?: PullRequestOverflowHandler | undefined;
327
334
  } | undefined) => Promise<PullRequest>;
328
335
  /**
329
336
  * Given a set of proposed updates, build a changeset to suggest.
@@ -186,7 +186,12 @@ class GitHub {
186
186
  * Update a pull request's title and body.
187
187
  * @param {number} number The pull request number
188
188
  * @param {ReleasePullRequest} releasePullRequest Pull request data to update
189
- * @param {}
189
+ * @param {string} targetBranch The target branch of the pull request
190
+ * @param {string} options.signoffUser Optional. Commit signoff message
191
+ * @param {boolean} options.fork Optional. Whether to open the pull request from
192
+ * a fork or not. Defaults to `false`
193
+ * @param {PullRequestOverflowHandler} options.pullRequestOverflowHandler Optional.
194
+ * Handles extra large pull request body messages.
190
195
  */
191
196
  this.updatePullRequest = wrapAsync(async (number, releasePullRequest, targetBranch, options) => {
192
197
  // Update the files for the release if not already supplied
@@ -196,7 +201,9 @@ class GitHub {
196
201
  message = (0, signoff_commit_message_1.signoffCommitMessage)(message, options.signoffUser);
197
202
  }
198
203
  const title = releasePullRequest.title.toString();
199
- const body = releasePullRequest.body
204
+ const body = ((options === null || options === void 0 ? void 0 : options.pullRequestOverflowHandler)
205
+ ? await options.pullRequestOverflowHandler.handleOverflow(releasePullRequest)
206
+ : releasePullRequest.body)
200
207
  .toString()
201
208
  .slice(0, MAX_ISSUE_BODY_SIZE);
202
209
  const prNumber = await (0, code_suggester_1.createPullRequest)(this.octokit, changes, {
@@ -527,6 +527,7 @@ class Manifest {
527
527
  const updatedPullRequest = await this.github.updatePullRequest(existing.number, pullRequest, this.targetBranch, {
528
528
  fork: this.fork,
529
529
  signoffUser: this.signoffUser,
530
+ pullRequestOverflowHandler: this.pullRequestOverflowHandler,
530
531
  });
531
532
  return updatedPullRequest;
532
533
  }
@@ -540,6 +541,7 @@ class Manifest {
540
541
  const updatedPullRequest = await this.github.updatePullRequest(snoozed.number, pullRequest, this.targetBranch, {
541
542
  fork: this.fork,
542
543
  signoffUser: this.signoffUser,
544
+ pullRequestOverflowHandler: this.pullRequestOverflowHandler,
543
545
  });
544
546
  // TODO: consider leaving the snooze label
545
547
  await this.github.removeIssueLabels([exports.SNOOZE_LABEL], snoozed.number);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "14.13.0",
3
+ "version": "14.13.1",
4
4
  "description": "generate release PRs based on the conventionalcommits.org spec",
5
5
  "main": "./build/src/index.js",
6
6
  "bin": "./build/src/bin/release-please.js",