-
Notifications
You must be signed in to change notification settings - Fork 35
Initial code for improving automated commit message #514
base: master
Are you sure you want to change the base?
Conversation
mockitoguy
commented
Oct 15, 2017
- TravisPlugin updates the commit message postfix and can include build url.
- See issue Automated commit message should have CI build ID #513 for details
- TravisPlugin updates the commit message postfix and can include build url. - See issue #513 for details
//can we construct the url from some Travis env variable? | ||
//this needs to be safe for local invocation where there are no travis env variables. | ||
String travisJobUrl = "https://travis-ci.org/mockito/shipkit/builds/288214072"; | ||
String postfix = ". CI job: " + travisJobUrl + " " + conf.getGit().getCommitMessagePostfix(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first commit will be too long. It would be better to have extra information available in the second (and the following) lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably also with the information about the release notes generation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment about the URL
GitCommitTask gitCommit = (GitCommitTask) project.getTasks().getByName(GitPlugin.GIT_COMMIT_TASK); | ||
//can we construct the url from some Travis env variable? | ||
//this needs to be safe for local invocation where there are no travis env variables. | ||
String travisJobUrl = "https://travis-ci.org/mockito/shipkit/builds/288214072"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get it. Should it be project specific? PowerMock or Mockito should rather have some other Travis links.
I haven't check it, but couldn't TRAVIS_BUILD_ID
be used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't check it, but couldn't TRAVIS_BUILD_ID be used here?
Yes, that's the idea! We won't be hardcoding any url here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for feedback!
GitCommitTask gitCommit = (GitCommitTask) project.getTasks().getByName(GitPlugin.GIT_COMMIT_TASK); | ||
//can we construct the url from some Travis env variable? | ||
//this needs to be safe for local invocation where there are no travis env variables. | ||
String travisJobUrl = "https://travis-ci.org/mockito/shipkit/builds/288214072"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't check it, but couldn't TRAVIS_BUILD_ID be used here?
Yes, that's the idea! We won't be hardcoding any url here!
//can we construct the url from some Travis env variable? | ||
//this needs to be safe for local invocation where there are no travis env variables. | ||
String travisJobUrl = "https://travis-ci.org/mockito/shipkit/builds/288214072"; | ||
String postfix = ". CI job: " + travisJobUrl + " " + conf.getGit().getCommitMessagePostfix(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!