Skip to content
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

Merged
merged 4 commits into from
Mar 5, 2024

Conversation

AlthausKonstantin
Copy link
Contributor

My proposal for #171.

- 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
@AlthausKonstantin
Copy link
Contributor Author

PS: CI Pipeline is failing due to psf/black#4175 :(

@waynesun09
Copy link
Collaborator

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.

@@ -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):
Copy link
Collaborator

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'

@waynesun09
Copy link
Collaborator

Thanks, lgtm and test also pass

@waynesun09 waynesun09 merged commit 799c75a into RedHatQE:main Mar 5, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants