Skip to content

Commit

Permalink
Merge pull request 'fix(api): error 500 on tag creation when a workfl…
Browse files Browse the repository at this point in the history
…ow exists' (#3324) from earl-warren/forgejo:wip-v1.21-tag-api-regression into v1.21/forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3324
Reviewed-by: Gusted <[email protected]>
  • Loading branch information
Earl Warren committed Apr 19, 2024
2 parents cc80e66 + a53194f commit f702129
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions services/repository/files/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
defer closer.Close()

if commit, err := gitRepo.GetCommit(sha); err != nil {
gitRepo.Close()
return fmt.Errorf("GetCommit[%s]: %w", sha, err)
} else if len(sha) != git.SHAFullLength {
// use complete commit sha
sha = commit.ID.String()
}
gitRepo.Close()

if err := git_model.NewCommitStatus(ctx, git_model.NewCommitStatusOptions{
Repo: repo,
Expand Down

0 comments on commit f702129

Please sign in to comment.