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

Update [email protected] #504

Merged
merged 2 commits into from
Mar 30, 2018
Merged

Update [email protected] #504

merged 2 commits into from
Mar 30, 2018

Conversation

bkeepers
Copy link
Contributor

Improvements:

@codecov
Copy link

codecov bot commented Mar 30, 2018

Codecov Report

Merging #504 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #504      +/-   ##
=========================================
+ Coverage   98.49%   98.5%   +<.01%     
=========================================
  Files          93      93              
  Lines        1395    1401       +6     
  Branches      171     171              
=========================================
+ Hits         1374    1380       +6     
  Misses         20      20              
  Partials        1       1

Copy link
Contributor

@wilhelmklopp wilhelmklopp left a comment

Choose a reason for hiding this comment

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

We haven't done it super consistently but could you run snappydoo for this so that the renders update?

And it might also be useful to add a test case that includes an image?

core.text = mrkdwn(this.abstractIssue.body_html);
const { text, image } = mrkdwn(this.abstractIssue.body_html);
core.text = text;
core.image_url = image;
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need a conditional here in case there is no image? I suppose Slack is fine with us passing image_url: undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

JSON.stringify actually strips keys with undefined values:

$ node
> JSON.stringify({foo: undefined})
'{}'

if (this.comment.body_html) {
const { text, image } = mrkdwn(this.comment.body_html);
baseMessage.text = text;
baseMessage.image_url = image;
Copy link
Contributor

Choose a reason for hiding this comment

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

same question here

@bkeepers
Copy link
Contributor Author

bkeepers commented Mar 30, 2018

👍 added tests and updated snappydoo for the new tests.

bkeepers and wilhelmklopp

@codecov-io
Copy link

Codecov Report

Merging #504 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #504      +/-   ##
=========================================
+ Coverage   98.49%   98.5%   +<.01%     
=========================================
  Files          93      93              
  Lines        1395    1401       +6     
  Branches      171     171              
=========================================
+ Hits         1374    1380       +6     
  Misses         20      20              
  Partials        1       1

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

Successfully merging this pull request may close these issues.

None yet

3 participants