Add predefined variable CI_COMMIT_MESSAGE (and maybe CI_COMMIT_SUMMARY and CI_COMMIT_DESCRIPTION)
CI_COMMIT_MESSAGE, like already existing CI_COMMIT_SHA and others, would be extremely usable in these use cases:
GIT_STRATEGY=none
- No
git
executable in image - Simplicity
CI_COMMIT_SHA and CI_COMMIT_MESSAGE are really no different, both can be easily retrieved using git
but it's nice to have it available as a predefined variable.
On top of CI_COMMIT_MESSAGE, CI_COMMIT_SUMMARY and CI_COMMIT_DESCRIPTION would be a nice addition too. But they're fairly easy to achieve when CI_COMMIT_MESSAGE is provided so I'm not super passionate about them.
export CI_COMMIT_SUMMARY=$(echo "$CI_COMMIT_MESSAGE" | head -n 1)
export CI_COMMIT_DESCRIPTION=$(echo "$CI_COMMIT_MESSAGE" | tail -n +2) # + some leading and trailing trim of newlines
CC @ayufan @grzesiek @markpundsack
If not something y'all would implement right away, maybe at least worth an ~"Accepting Merge Requests"?