-
Notifications
You must be signed in to change notification settings - Fork 10
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(#145): rework hint to status message that can be updated when status is changed #209
feat(#145): rework hint to status message that can be updated when status is changed #209
Conversation
d36ab83
to
0e27c6a
Compare
…ed when status is changed
2b6292a
to
7f9118c
Compare
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.
I like this simplification a lot. The feature of editing existing comments is something we should discuss though. I am not sure if that is really what I would expect to have in my PRs.
docs/fragments/pr-sanitizer.adoc
Outdated
@@ -35,5 +35,7 @@ include::../../pkg/plugin/pr-sanitizer/test_fixtures/github_calls/pr-sanitizer.y | |||
|
|||
=== Status details | |||
|
|||
Here, you can find status details description applicable for each state of the `pr-sanitizer` plugin. |
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.
I would replace Here,
with In this section
docs/fragments/work-in-progress.adoc
Outdated
@@ -40,5 +40,7 @@ include::../../pkg/plugin/work-in-progress/test_fixtures/github_calls/work-in-pr | |||
|
|||
=== Status details | |||
|
|||
Here, you can find status details description applicable for each state of the `work-in-progress` plugin. |
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.
I would replace
Here,with
In this section`
if strings.TrimSpace(content) == strings.TrimSpace(*statusMsg) { | ||
return nil | ||
} | ||
return s.commentService.EditComment(*com.ID, statusMsg) |
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.
I'm not sure we should edit comments. I look at PR comments (and events) as a timeline so I would rather append new comments with the relevant message. Maybe we can extend the message to point to commit? "It seems that prior to commit 6fas341213ad3a there are no tests in this PR" or sth like - to get the idea, as the wording is not ideal. WDYT?
Ω(err).ShouldNot(HaveOccurred()) | ||
}) | ||
|
||
It("should modify existing comment when a new message is provided", func() { |
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.
I am not sure if it is not confusing. We rarely modify our own comments to keep the context of the discussion right, so why would bot do that?
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.
Based on the offline discussion we concluded that updating comment is fine, as it will serve as a single information point from the plugin. Similarly to how e.g. codecov
is doing.
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.
Thank you @MatousJobanek. lgtm.
test-keeper
where different messages are set for the cases when either the PR is updated by commit containing a test or is updated so it contains only skipped files - for more information see this comment Update Ike's reaction in the PR if the state changes #145 (comment).md
files in.ike-prow/
directorytest-keeper_without_tests_message.md
for the case when no tests is addedtest-keeper_with_tests_message.md
for the case when PR is updated by a commit containing a testtest-keeper_only_skipped_message.md
for the case when PR is updated so it contains only those files that are skippedFixes: #145
TODO: