3

I have been trying to create a simple Probot app that amongst other things will merge PRs on certain criteria being met. (I am aware prebuilt solutions are available, however not only do they not quite fit my needs, I won't learn anything).

Using context.github.pulls.merge(context.issue()) returns: ERROR probot: Resource not accessible by integration

I have tried replacing context.issue() with the object the docs suggest its looking for. Googling although difficult to find similar issues, suggest its a permission issue, I have double checked the permissions and at one stage given the app every permission.

Things worth noting:

  • There are no github actions setup on this repo
  • The repo belongs to a testing org, the bot app has access to all repos in the org
  • The repo was initially private, but have also tested in public

Any nudge in the right direction will be greatly appreciated.

Thanks

Matt Smith
  • 31
  • 1

1 Answers1

0

I see it has been quite a while since you posted this question.

You should not be using context.github.pulls.merge(context.issue()) in the first place. This will never work given the signature of the actual merge method(). You said you have tried following the doc's suggestion.

Is this the doc you are referring to? The doc clearly suggests to provide owner, repo and pull_number to context.github.pulls.merge(). Did you try that? Please dod share your findings.

Asif Kamran Malick
  • 2,409
  • 3
  • 25
  • 47