Skip to content

Commit

Permalink
Ignore errors when initializing repo sync for the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgDangl committed Jul 14, 2023
1 parent e71d5f0 commit fef4b94
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to **Dangl.GiteaOrgManager** are documented here.

## v1.0.2:
- Ignore failures when starting initial repo sync

## v1.0.1:
- Add retry logic for API calls

Expand Down
13 changes: 10 additions & 3 deletions src/Dangl.GiteaOrgManager/OrgCreationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,16 @@ private async Task ConfigurePushTargetsFromSourceToTargetRepositoriesAsync(Organ
}
}

// We want to initiate a push right away to ensure the new org
// has up to date code
await repositoryClient.RepoPushMirrorSyncAsync(sourceOrg.Name, sourceRepo.Name);
try
{
// We want to initiate a push right away to ensure the new org
// has up to date code
await repositoryClient.RepoPushMirrorSyncAsync(sourceOrg.Name, sourceRepo.Name);
}
catch
{
// But when it doesn't work, it'll be automatically started in a day
}
}
}

Expand Down

0 comments on commit fef4b94

Please sign in to comment.