jacob-meacham / serverless-plugin-git-variables

:zap: Expose git variables to serverless
MIT License
87 stars 32 forks source link

Feature request: Add support for commit subject #67

Closed vhenzl closed 3 years ago

vhenzl commented 3 years ago

Existing git:message returns the whole commit message, i.e. both subject and body. However, the body can sometimes be quite long and git:message used in Description of CloudFormation template can lead to error an error on deploy:

The CloudFormation template is invalid: Template format error: 'Description' length is greater than 1024.

Would be great to be able to use just the message subject alone, could be available as git:subject. Or even have git:messageSubject and git:messageBody to be able to get both parts of the message independently.

jacob-meacham commented 3 years ago

@vhenzl this is a good idea. For backwards compatibility, I'd like to leave git:message right now, but adding git:messageSubject and git:messageBody sounds great. I'm not sure I have the bandwidth to make this change right now, but I will gladly accept a PR. Thanks!