Skip to content

Commit

Permalink
feat: fix no sdk generated
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-timothy-albert committed Mar 6, 2024
1 parent a000158 commit 594edfd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/actions/runWorkflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package actions

import (
"fmt"

"github.com/hashicorp/go-version"
"github.com/speakeasy-api/sdk-generation-action/internal/git"
"github.com/speakeasy-api/sdk-generation-action/internal/run"
Expand Down Expand Up @@ -132,6 +133,11 @@ func RunWorkflow() error {

// Sets outputs and creates or adds releases info
func finalize(outputs map[string]string, branchName string, anythingRegenerated bool, g *git.Git) error {
// If nothing was regenerated, we don't need to do anything
if !anythingRegenerated {
return nil
}

branchName, err := g.FindBranch(branchName)
if err != nil {
return err
Expand All @@ -145,11 +151,6 @@ func finalize(outputs map[string]string, branchName string, anythingRegenerated
}
}()

// If nothing was regenerated, we don't need to do anything
if !anythingRegenerated {
return nil
}

switch environment.GetMode() {
case environment.ModePR:
branchName, pr, err := g.FindExistingPR(branchName, environment.ActionFinalize)
Expand Down

0 comments on commit 594edfd

Please sign in to comment.