-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Build overview: don't create comment for projects with empty diffs #12291
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
Conversation
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.
This is great, I just had a question on the control of the logic.
I don't remember were we ended finally. Are we posting only one comment or a comment per build/push? If we are posting multiple comments, what comment will we update when there is no file changes? |
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.
This is great, I just had a question on the control of the logic.
One comment per project |
readthedocs/oauth/services/base.py
Outdated
@@ -111,8 +111,13 @@ def get_clone_token(self, project): | |||
"""Get a token used for cloning the repository.""" | |||
raise NotImplementedError | |||
|
|||
def post_comment(self, build, comment: str): | |||
"""Post a comment on the pull request attached to the build.""" | |||
def post_comment(self, build, comment: str, update_only: bool = False): |
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.
Seems this didn't get updated?
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.
Pushed up a fix to the base, looks good to me.
This is so we don't create comments when no files have been changed, but we still update the comment if we already reported a build with changed files.