Skip to content

Commit

Permalink
Sync: warn if no items to sync were found in the source repo
Browse files Browse the repository at this point in the history
  • Loading branch information
SIMULATAN committed Dec 15, 2024
1 parent cfe8fc4 commit 7aa8009
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/github/sync_labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ var labelsCmd = &cobra.Command{

labels, err := github.ListGitHubLabels(sourceRepo)
cobra.CheckErr(err)
if len(labels) == 0 {
cmdutils.Logger.Warn("No Labels in source repo found, aborting sync.")
return
}

repos := make([]utils.GitRepo, len(targets))
for i, target := range targets {
Expand Down
4 changes: 4 additions & 0 deletions cmd/github/sync_milestones.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ var milestonesCmd = &cobra.Command{

milestones, err := github.ListGitHubMilestones(sourceRepo)
cobra.CheckErr(err)
if len(milestones) == 0 {
cmdutils.Logger.Warn("No Milestones in source repo found, aborting sync.")
return
}

repos := make([]utils.GitRepo, len(targets))
for i, target := range targets {
Expand Down

0 comments on commit 7aa8009

Please sign in to comment.