Webhook when moving a repository

Hello,

I have a GitHub app that doesn’t get notified when a user moves a repository into the user/organization where my GitHub app is installed. I was expecting a installation_repositories event with added action.

Is this a bug or am I doing something wrong?

Thanks,

Fernando.

Looking at the event description here 

https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent

This event is triggered when an application is given access to a repository rather than when a repository is added to an org where the app is installed 

This might also help clarify https://developer.github.com/apps/differences-between-apps/ 

> GitHub Apps aren’t subject to organization application policies. A GitHub App only has access to the repositories an organization owner has granted.

> A GitHub App receives a webhook event when an installation is changed or removed. This tells the app creator when they’ve received more or less access to an organization’s resources.

It might be that what you are looking for is the Repository Event or the RepositoryImportEvent, I don’t quite have enough context to give guidance on that.

Hope this helps.

Ian

Thanks Ian for your response.

@i-marsh wrote:

 

https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent

This event is triggered when an application is given access to a repository rather than when a repository is added to an org where the app is installed 

I understand that, but it also triggers for new repos if an installation has access to all repos of a namespace (I just tried it and it’s sent, together with a “repository created” event). My issue is that it does not get triggered when you  move a repository  into the namespace from another one. “RepositoryImportEvent” is not triggered either.

Hmmm interesting,

So when you say  moved do you mean transferred? 

If so this might be an edge case that has been overlooked I guess, as it is not “created” or “deleted”  - Internally I suspect that some pointers are re-mapped but are not triggering the API event.

When you look at inbound webhooks I take it that nothing is received when you transfer a repo in or out, but it is when created or removed … 

Have I understood correctly?

UI glitch in forum

While I’m not the original poster, I can confirm that your assessment is correct (I was dealing with this in the past week myself).

I was unable to find any webhook notification that gets delivered when a repository is transferred in our out of an account.  I tried this under two distinct cases:

  1. Transfers to/from a user account and an organization controlled by that user
  2. Transfers between two separate and distinct user accounts

AFACT, there is no way receive notifications for a repo transfer.

1 Like

I’ll flag this observation internally. 

Is there any progress on this? Struggling with it here as well.