Skip to content

Commit

Permalink
Releases/v2.2.5 new pr (#274)
Browse files Browse the repository at this point in the history
* Limit the length of commit message (#271)

* Limit the length of commit message

* Refactor

* Added comment

Co-authored-by: Akshay Kumar <[email protected]>

* updating packages

Co-authored-by: Akshay Kumar <[email protected]>
  • Loading branch information
kumaraksh1 and Akshay Kumar authored Dec 6, 2022
1 parent 798786c commit 4dbe516
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 4 deletions.
5 changes: 4 additions & 1 deletion lib/actionparameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ class ActionParameters {
this._images = core.getInput('images');
this._multiContainerConfigFile = core.getInput('configuration-file');
this._startupCommand = core.getInput('startup-command');
this._commitMessage = github.context.eventName === 'push' ? github.context.payload.head_commit.message.split(/\r?\n/)[0] : "";
/**
* 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._endpoint = endpoint;
}
static getActionParams(endpoint) {
Expand Down
50 changes: 50 additions & 0 deletions node_modules/resolve/bin/resolve

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/actionparameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ export class ActionParameters {
this._images = core.getInput('images');
this._multiContainerConfigFile = core.getInput('configuration-file');
this._startupCommand = core.getInput('startup-command');
this._commitMessage = github.context.eventName === 'push'? github.context.payload.head_commit.message.split(/\r?\n/)[0] : "";
this._endpoint = endpoint;
/**
* 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._endpoint = endpoint;
}

public static getActionParams(endpoint?: IAuthorizer) {
if (!this.actionparams) {
this.actionparams = new ActionParameters(!!endpoint ? endpoint : null);
}

return this.actionparams;
}
public get appName() {
Expand Down

0 comments on commit 4dbe516

Please sign in to comment.