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

Support custom messages (per project) #54

Merged
merged 3 commits into from Jun 13, 2017
Merged

Conversation

TBonnin
Copy link
Contributor

@TBonnin TBonnin commented Jun 8, 2017

Implementation of #52

Allow devs to specify for each checkpoint a set of files (one per status) which content would be appended to the PR comment.

{
  "url": "https://www.theguardian.com",
  "overdue": "15M",
  "messages": {
    "seen": "prout/seen.md",
    "overdue": "prout/overdue.md"
  }
}

screen shot 2017-06-08 at 16 59 25

{
  "url": "https://www.theguardian.com",
  "overdue": "20M",
  "messages": {
    "seen": "prout/seen.md",
    "overdue": "prout/overdue.md"
  }
}
The value for each status would be the path of a file contained in the
repository
The file content would be appended to the comment if set.
If no custom message is set, the default string 'Please check your changes!' would be appended
@TBonnin TBonnin requested a review from rtyley June 8, 2017 15:58
Copy link
Member

@rtyley rtyley left a comment

Choose a reason for hiding this comment

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

Looks great! Only thing you might want to do is add support for this new feature to the config diagnostic screen (eg on https://prout-bot.herokuapp.com/view/guardian/frontend, where you get feedback on whether Prout has successfully read all your conifg) - but I think it's ok to merge without it.

image

.futureValue
.lastOption
.map(_.body)
.getOrElse("")
Copy link
Member

Choose a reason for hiding this comment

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

I often use .mkString instead of .getOrElse(""), as they're equivalent.

@TBonnin TBonnin force-pushed the tbonnin/custom-messages branch 3 times, most recently from f8f543d to edb901b Compare June 12, 2017 13:57
@TBonnin
Copy link
Contributor Author

TBonnin commented Jun 12, 2017

@rtyley I have added the custom messages info to the config diagnostic page: 855e471

screen shot 2017-06-12 at 10 56 14

Let me know what you think. Thanks

@prout-bot
Copy link
Contributor

Seen on PROD (created by @TBonnin and merged by @rtyley 2 hours, 24 minutes and 28 seconds ago) Please check your changes!

Sentry Release: prout

@rtyley
Copy link
Member

rtyley commented Jun 13, 2017

Here's the first comment to use this new help:

image

@TBonnin
Copy link
Contributor Author

TBonnin commented Jun 13, 2017

I noticed a small issue with the diagnostic page:
screen shot 2017-06-13 at 13 59 19
https://prout-bot.herokuapp.com/view/guardian/frontend

I will push a fix when I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants