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

Add Comment.react_to_the_comment, Comment.get_reactions, Reaction.delete #636

Merged

Conversation

nikromen
Copy link
Member

Support for reacting to comments, getting list of reactions and deleting reactions.
Also compatibility.md file - updated.

Fixes #630


Ogr now supports reacting to the comment with a given reaction, getting them in list and deleting them (only when reaction is added by using ogr API).

@nikromen nikromen force-pushed the +1-to-the-comment-command branch 2 times, most recently from e558906 to 9944175 Compare August 26, 2021 15:19
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

Copy link
Member

@mfocko mfocko left a comment

Choose a reason for hiding this comment

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

LGTM, for the service-side part I would have a look at functools.partial, it might make it easier for you and reduce code duplication. 😉

ogr/abstract.py Outdated Show resolved Hide resolved
Comment on lines +31 to +32
ProjectIssueNoteAwardEmoji,
ProjectMergeRequestAwardEmoji,
Copy link
Member

Choose a reason for hiding this comment

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

👀

ogr/services/gitlab/comments.py Outdated Show resolved Hide resolved
ogr/services/pagure/comments.py Outdated Show resolved Hide resolved
tests/integration/github/test_generic_commands.py Outdated Show resolved Hide resolved
Comment on lines 272 to 273
pr = self.service.get_project(repo="playground", namespace="nikromen").get_pr(4)
pr_comment = pr.comment(datetime.now().strftime("%m/%d/%Y"))
Copy link
Member

Choose a reason for hiding this comment

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

Ya, we should do fixtures for playground, comments, etc. as part of #445

Copy link
Member

@lachmanfrantisek lachmanfrantisek left a comment

Choose a reason for hiding this comment

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

Thanks for implementing the get/delete operations as well!

ogr/services/github/comments.py Outdated Show resolved Hide resolved
ogr/services/gitlab/comments.py Outdated Show resolved Hide resolved
ogr/abstract.py Outdated Show resolved Hide resolved
@nikromen nikromen force-pushed the +1-to-the-comment-command branch 4 times, most recently from 57c1c7c to 2524638 Compare August 30, 2021 14:48
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

Copy link
Member

@mfocko mfocko left a comment

Choose a reason for hiding this comment

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

LGTM

ogr/abstract.py Outdated Show resolved Hide resolved
Reaction.delete, Comment.react_to_comment, Comment.get_reactions
added. Not supported by Pagure.
Added support for reacting to comment with given reaction,
getting list of reactions on given comment and deleting
given reaction.
@nikromen nikromen force-pushed the +1-to-the-comment-command branch from 2524638 to 12a04ad Compare September 14, 2021 15:58
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@nikromen nikromen added the mergeit When set, zuul wil gate and merge the PR. label Sep 14, 2021
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 8dbbc23 into packit:main Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Give reaction on comment commands in GitHub and GitLab
3 participants