-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCM commit message #4877
SCM commit message #4877
Conversation
- Retrieve last commit message (Git and SVN) Signed-off-by: Uilian Ries <uilianries@gmail.com>
I can't reproduce the error from Jenkins. 🤔 The error is:
The command used to test:
Any idea how to create an environment which I can reproduce the same error? |
I cannot reproduce it in my machine, but having a look at the code this is my diagnosis: When the test is calling to status = self.run("status")
if "No commits yet" in status:
return None Nevertheless, it is failing with message = self.run("log -1 --format=%s%n%b") and it fails (return non-zero).
Btw, I'm not sure if we can rely on the def get_commit_message(self):
self.check_repo()
try:
return self.run("log -1 --format=%s%n%b")
except Exception as error:
return None Or do you think that the command could fail for other reasons other than |
@jgsogo thanks for helping! 😄
No, I just wanted to avoid an ugly error message when trying to retrieve the log when there is no commit there. I'll update this PR to ignore the status step. |
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-Authored-By: uilianries <uilianries@gmail.com>
Co-Authored-By: uilianries <uilianries@gmail.com>
please, @uilianries , solve the conflicting files. |
…ure/commit-message
@uilianries Test failing, looks like a missing import. |
- SCM tests were moved to a new place, so both message tests need to be reallocated to there.
@lasote It's working again! 😄 |
Retrieve last commit message (Git and SVN). We can use this feature in CPT (Conan Package Tools).
@tags: svn, slow, git
Changelog: Feature: Get commit message
Docs: conan-io/docs#1175
develop
branch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.