Skip to content

Commit

Permalink
Do not create a generation when no commit is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
nlewo committed Jun 9, 2024
1 parent 0a68944 commit 258d627
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ func (m Manager) onRepositoryStatus(ctx context.Context, rs repository.Repositor
}
}

if rs.SelectedCommitId == m.generation.SelectedCommitId && rs.SelectedBranchIsTesting == m.generation.SelectedBranchIsTesting {
if rs.SelectedCommitId == "" {
logrus.Debugf("No commit has been selected from remotes")
m.isRunning = false
} else if rs.SelectedCommitId == m.generation.SelectedCommitId && rs.SelectedBranchIsTesting == m.generation.SelectedBranchIsTesting {
logrus.Debugf("The repository status is the same than the previous one")
m.isRunning = false
} else {
Expand Down

0 comments on commit 258d627

Please sign in to comment.