Lesiak
Lesiak

Reputation: 26064

How to check if repository mirror is up to date in Gitlab?

I am trying to use repository mirroring to streamline my workflow. I have a repository that uses pull mirroring from the upstream. I am trying to trigger mirror update via api

My questions:

To give you more context, I want to:

I refresh the mirror to ensure that the merge request can be merged without conflicts. My pipeline is the only source of merge requests to the upstream. I am afraid of race condition between refresh mirror request and create branch request.

Upvotes: 2

Views: 847

Answers (1)

Lesiak
Lesiak

Reputation: 26064

There are two fields ton the get single project endpoint GET /projects/:id

  • import_status (with "finished" as a marker of success)
  • import_error (with null as a marker of success)

I wasn't able to find out the timestamp of last mirror update though.

Upvotes: 1

Related Questions