-
Notifications
You must be signed in to change notification settings - Fork 719
Closed
Labels
Description
Description
Issuing an API build request with message
value does not change the TRAVIS_COMMIT_MESSAGE
.
Steps to reproduce
body='{
"request": {
"message": "Override the commit message: this is an api request",
"branch":"master",
"config": {
"env": {
"matrix": ["TEST=unit"]
},
"script": "echo FOO"
}
}}'
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token xxxxxx" \
-d "$body" \
https://api.travis-ci.org/repo/travis-ci%2Ftravis-core/requests
Expected behavior
$TRAVIS_COMMIT_MESSAGE
is set to the value given in the payload: "Override the commit message: this is an api request"
.
Actual behavior
It is the same as one given in the latest commit in git.
Discussion
Currently, $TRAVIS_COMMIT_MESSAGE
is set by reading the git
data (https://github.com/travis-ci/travis-build/blob/1f67b6407de09a7a972f8ff568d96b8bd2ef7ba9/lib/travis/build/env/builtin.rb#L43), not the payload passed to travis-build
. This is done in order to avoid certain issues when passing non-ASCII characters (#965 (comment)).
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]API builds cannot override `TRAVIS_COMMIT_MESSAGE`[/-][+]API builds does not override `TRAVIS_COMMIT_MESSAGE`[/+]stale commentedon Apr 13, 2018
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues
Allow builds without the trigger code in message
stale commentedon Jan 26, 2019
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue in 7 days. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please respond before the issue is closed, or open a new one after. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues
BanzaiMan commentedon Feb 11, 2019
https://travis-ci.community/t/travis-commit-message-is-not-overwritten-by-env-set-in-api-payload-it-is-always-set-by-the-git-data/2233
AlexHarrisonIBM commentedon Sep 21, 2020
So is this still an issue
2 remaining items