-
Notifications
You must be signed in to change notification settings - Fork 25
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
Feat/answer to comments #172
Feat/answer to comments #172
Conversation
- add comments parent uri as keyword argument to `create_comment` - check if parent uri is an existing comment of this workitem - this enables commenting existing comments - replace ceateComment with addComment as former is deprecated
PS: CI Pipeline is failing due to psf/black#4175 :( |
The update lgtm. I saw the createComment API is marked as Deprecated by addComment, so this change is necessary and we could keep the create_comment function name for backward compatibility for our users. For the Black and reorder incompatible issue, could you revert the change with pre-commit component changes until there is a solution for that, thanks. |
- roll back necessary due to psf/black#4175
6ee96d7
to
e36b40f
Compare
src/pylero/work_item.py
Outdated
@@ -709,15 +711,23 @@ def create_attachment(self, path, title): | |||
self.uri, filename, title, data | |||
) | |||
|
|||
def create_comment(self, content): | |||
"""method create_comment adds a comment to the current _WorkItem | |||
def create_comment(self, title, content, parent_uri=None): |
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.
Need switch title and content position to make it backward compatible, test failed with:
src/unit_tests/work_item_test.py::WorkItemTest::test_009_create_comment - TypeError: _WorkItem.create_comment() missing 1 required positional argument: 'content'
Thanks, lgtm and test also pass |
My proposal for #171.