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(#145): rework hint to status message that can be updated when status is changed #209

Merged
merged 6 commits into from
Jun 26, 2018

Conversation

MatousJobanek
Copy link
Contributor

@MatousJobanek MatousJobanek commented Jun 21, 2018

  • reworked hint to a more elaborated status message
  • status message can be updated
    • this is used in 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)
    • for the happy (success) comments, there is used a happy Ike's image
  • the size of Ike's image is smaller
  • there is only one possibility of customizing the messages - using .md files in .ike-prow/ directory
    • the files that are checked are:
      • test-keeper_without_tests_message.md for the case when no tests is added
      • test-keeper_with_tests_message.md for the case when PR is updated by a commit containing a test
      • test-keeper_only_skipped_message.md for the case when PR is updated so it contains only those files that are skipped

Fixes: #145

TODO:

  • update documentation

@MatousJobanek MatousJobanek force-pushed the issue-148-update-hint branch 2 times, most recently from d36ab83 to 0e27c6a Compare June 21, 2018 16:22
@MatousJobanek MatousJobanek changed the title feat(#148): rework hint to status message that can be updated when status is changed feat(#145): rework hint to status message that can be updated when status is changed Jun 21, 2018
@MatousJobanek MatousJobanek force-pushed the issue-148-update-hint branch from 2b6292a to 7f9118c Compare June 21, 2018 17:13
Copy link
Member

@bartoszmajsak bartoszmajsak left a 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.

@@ -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.
Copy link
Member

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

@@ -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.
Copy link
Member

Choose a reason for hiding this comment

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

I would replace Here,withIn this section`

if strings.TrimSpace(content) == strings.TrimSpace(*statusMsg) {
return nil
}
return s.commentService.EditComment(*com.ID, statusMsg)
Copy link
Member

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() {
Copy link
Member

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?

bartoszmajsak
bartoszmajsak previously approved these changes Jun 25, 2018
Copy link
Member

@bartoszmajsak bartoszmajsak left a 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.

Copy link
Contributor

@dipak-pawar dipak-pawar left a 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.

@dipak-pawar dipak-pawar merged commit e339f89 into arquillian:master Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants