Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Initial code for improving automated commit message #514

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mockitoguy
Copy link
Member

- 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();
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

Copy link
Member

@szpak szpak left a 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";
Copy link
Member

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?

Copy link
Member Author

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!

Copy link
Member Author

@mockitoguy mockitoguy left a 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";
Copy link
Member Author

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();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants