Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 6

Pull requests merged through the API are not auto closing issues (closing keywords)

Solved! Go to Solution.

Hi

 

I have a probot app that merges pull requests once all CI statuses succeed. 

 

Some users reported that the pull requests merged with the bot are not triggering closing issues with keywords.

 

I could reproduce it with this pull request and this issue.

 

Is closing via API supposed to behave as closing via web? 

 

Screen Shot 2019-06-15 at 7.30.33 PM.pngScreen Shot 2019-06-15 at 7.30.49 PM.png

5 Replies
Solution
Copilot Lvl 3
Message 2 of 6

Re: Pull requests merged through the API are not auto closing issues (closing keywords)

The mystery has been solved 🎉

 

After playing back-and-forth, even trying some non-sense stuff. I found the problem!

 

\giphy

 

The bot needs issue write permissions, otherwise closing issues using keywords will "fail silently" (╯°□°)╯︵ ┻━┻

 

Community Manager
Message 3 of 6

Re: Pull requests merged through the API are not auto closing issues (closing keywords)

Hey @phstc,

 

Thanks a lot for being here, we appreciate you coming back to share your solution.


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 2
Message 4 of 6

Re: Pull requests merged through the API are not auto closing issues (closing keywords)

We're observing the same issue, but with the Mergify app. Which does seem to have issue write permission, so I'm stumped as to how to solve this...

Copilot Lvl 3
Message 5 of 6

Re: Pull requests merged through the API are not auto closing issues (closing keywords)

Hi @mboes 

 

If the problem is with permissions you may be able to see some specific errors in the logs.

Copilot Lvl 2
Message 6 of 6

Re: Pull requests merged through the API are not auto closing issues (closing keywords)

Turns out this was the same problem as for you. It's been fixed by upstream since a couple of months ago. See https://github.com/Mergifyio/mergify-engine/issues/466#issuecomment-520297764.