Be notified after project import completion
Overview
When a new project is created using import (import from url or from got etc...), it is not possible to be notified AFTER import is completed. Subsequent API requests may not be usable BEFORE import is completed: for example to update a file, we have to wait for the file to actually be present before updating it.
As of today, a "workaround" is to continuously ping
the project to read the import_status
until it changes. When it is finally set to finished
, then we are good to operate with the freshly created repo.
Proposal
Instead of implementing the logic to continuously ping
the project, it would be more efficient to be notified in some way.
So far, I don't see Push or Commit webhooks to be triggered after import completion.
I would suggest that the POST /projects
endpoint allows a new parameter post_import_url
to provide our own POST endpoint to be executed after the project finishes import (successfully or not).