-
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
Fix comment not found #16
Conversation
5cb0d2e
to
e42b2f7
Compare
@@ -57,7 +51,8 @@ module.exports = class Freeze { | |||
})); | |||
|
|||
this.github.issues.createComment(context.issue({ | |||
body: 'Sure thing. I\'ll close this issue for a bit. I\'ll ping you around ' + props.unfreezeMoment.calendar() + ' :clock1: ' + | |||
body: 'Sure thing. I\'ll close this issue for a bit. I\'ll ping you around ' + | |||
moment(props.unfreezeMoment).calendar() + ' :clock1: ' + |
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 actually causing the tests to fail now because moment().calendar()
returns the date as mm/dd/yyyy
. I actually can't figure out how the tests were even passing before.
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.
Nevermind. I just came back to this to try to fix it and the tests are actually passing. 😕
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'll run all this through again on master once the merges happen to make sure things are clean.
At the end of the day, we are 🔥 much of this to go to metadata anyway, so that should help
index.js
Outdated
@@ -49,7 +49,7 @@ module.exports = robot => { | |||
context.github.issues.getComments(githubHelper.parseCommentURL(issue.comments_url)).then(resp => { | |||
return freeze.getLastFreeze(resp.data); | |||
}).then(lastFreezeComment => { |
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.
so this use case should not happen. if you got this far, that means you are in a thread that is frozen, so you should have a last frozen comment. The problem is upstream from this.
@@ -57,7 +51,8 @@ module.exports = class Freeze { | |||
})); | |||
|
|||
this.github.issues.createComment(context.issue({ | |||
body: 'Sure thing. I\'ll close this issue for a bit. I\'ll ping you around ' + props.unfreezeMoment.calendar() + ' :clock1: ' + | |||
body: 'Sure thing. I\'ll close this issue for a bit. I\'ll ping you around ' + | |||
moment(props.unfreezeMoment).calendar() + ' :clock1: ' + |
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'll run all this through again on master once the merges happen to make sure things are clean.
At the end of the day, we are 🔥 much of this to go to metadata anyway, so that should help
this may no longer fix your comment not found error now, but we can address that separately. |
This fixes #8 by:
.calendar()
on a plain ol' string, preventing the app from leaving its special comment with the freeze attributes