From e8324ca237c686f6f1834942340eb25c523de5b7 Mon Sep 17 00:00:00 2001 From: kumaraksh1 <112485097+kumaraksh1@users.noreply.github.com> Date: Mon, 27 Mar 2023 14:37:17 +0530 Subject: [PATCH] Trim commit message (#301) Co-authored-by: Akshay Kumar --- lib/actionparameters.js | 2 +- src/actionparameters.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/actionparameters.js b/lib/actionparameters.js index c0ccd857e..da9f84164 100644 --- a/lib/actionparameters.js +++ b/lib/actionparameters.js @@ -37,7 +37,7 @@ class ActionParameters { /** * Trimming the commit message because it is used as a param in uri of deployment api. And sometimes, it exceeds the max length of http URI. */ - this._commitMessage = github.context.eventName === 'push' ? github.context.payload.head_commit.message.slice(0, 7000) : ""; + this._commitMessage = github.context.eventName === 'push' ? github.context.payload.head_commit.message.slice(0, 1000) : ""; this._endpoint = endpoint; } static getActionParams(endpoint) { diff --git a/src/actionparameters.ts b/src/actionparameters.ts index 4d3ff6c5c..a21e3bbd4 100644 --- a/src/actionparameters.ts +++ b/src/actionparameters.ts @@ -48,7 +48,7 @@ export class ActionParameters { /** * Trimming the commit message because it is used as a param in uri of deployment api. And sometimes, it exceeds the max length of http URI. */ - this._commitMessage = github.context.eventName === 'push' ? github.context.payload.head_commit.message.slice(0, 7000) : ""; + this._commitMessage = github.context.eventName === 'push' ? github.context.payload.head_commit.message.slice(0, 1000) : ""; this._endpoint = endpoint; }