Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion services/agit/agit.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ import (
func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.Repository, opts *private.HookOptions) ([]private.HookProcReceiveRefResult, error) {
results := make([]private.HookProcReceiveRefResult, 0, len(opts.OldCommitIDs))
topicBranch := opts.GitPushOptions["topic"]
forcePush, _ := strconv.ParseBool(opts.GitPushOptions["force-push"])
forcePushStr := opts.GitPushOptions["force-push"]
var forcePush bool
if forcePushStr == "" {
forcePush = true
} else {
forcePush, _ = strconv.ParseBool(forcePushStr)
}
title := strings.TrimSpace(opts.GitPushOptions["title"])
description := strings.TrimSpace(opts.GitPushOptions["description"]) // TODO: Add more options?
objectFormat := git.ObjectFormatFromName(repo.ObjectFormatName)
Expand Down
Loading