-
Notifications
You must be signed in to change notification settings - Fork 9
handle pull_request.synchronize action #4
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
base: master
Are you sure you want to change the base?
Conversation
| .post('/app/installations/321696/access_tokens') | ||
| .reply(200, {token: 'test'}) | ||
|
|
||
| nock('https://api.github.com') |
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.
let me know if you want me to remove the nock chaining here. I just wanted to make sure you know about it :)
|
@hiimbex do you have CI setup yet? Note that the tests pass although I didn’t implement the handling of the |
|
For the record the "fix" is simple - app.on('pull_request.opened', async context => {
+ app.on([
+ 'pull_request.opened',
+ 'pull_request.synchronize'
+ ], async context => {I just don’t want to push it so you can reproduce the tests already pass |
hiimbex
left a comment
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 quite sure the fix is that simple...
My initial implementation takes the existing PR body and adds content to the end of it. If the bot has already editted it when the PR was first opened you could get a state like:
My pr body!!
----
Link to rendered markdown file: a
-----
Link to rendered markdown file b
Where a was edited when the PR was first opened, and b was editted and triggered from a synchronized event, or worse:
My pr body!!
----
Link to rendered markdown file: a
-----
Link to rendered markdown file a
Link to rendered markdown file b
where you edit a again.
I'm wondering in regards to the tests "passing" if because that payload is not an opened action if maybe it's not being run/triggered at all?
Also, yes should totally set up Travis! I'll get into that!
After running the CI, I see I was wrong about it perhaps not being run at all. Honestly not sure! I'm guessing it's an issue with |
closes #3