summaryrefslogtreecommitdiffstats
path: root/services/agit
diff options
context:
space:
mode:
authorMichael Kriese <michael.kriese@visualon.de>2024-08-08 12:34:51 +0200
committerMichael Kriese <michael.kriese@visualon.de>2024-08-12 09:00:41 +0200
commit2d05e922a2cec0ec7c8e62e7909d0187faefdbb3 (patch)
tree9e2a25f779bc32971fbf62b17682e503ab520b59 /services/agit
parentMerge pull request 'Update renovate to v38.25.0 (forgejo)' (#4933) from renov... (diff)
downloadforgejo-2d05e922a2cec0ec7c8e62e7909d0187faefdbb3.tar.xz
forgejo-2d05e922a2cec0ec7c8e62e7909d0187faefdbb3.zip
fix(agit): run full pr checks on force-push
Diffstat (limited to 'services/agit')
-rw-r--r--services/agit/agit.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/services/agit/agit.go b/services/agit/agit.go
index bd8cc82e55..a18f9ef728 100644
--- a/services/agit/agit.go
+++ b/services/agit/agit.go
@@ -211,6 +211,8 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
return nil, fmt.Errorf("failed to update the reference of the pull request: %w", err)
}
+ // TODO: refactor to unify with `pull_service.AddTestPullRequestTask`
+
// Add the pull request to the merge conflicting checker queue.
pull_service.AddToTaskQueue(ctx, pr)
@@ -218,12 +220,19 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
return nil, fmt.Errorf("failed to load the issue of the pull request: %w", err)
}
+ // Validate pull request.
+ pull_service.ValidatePullRequest(ctx, pr, oldCommitID, opts.NewCommitIDs[i], pusher)
+
+ // TODO: call `InvalidateCodeComments`
+
// Create and notify about the new commits.
comment, err := pull_service.CreatePushPullComment(ctx, pusher, pr, oldCommitID, opts.NewCommitIDs[i])
if err == nil && comment != nil {
notify_service.PullRequestPushCommits(ctx, pusher, pr, comment)
}
notify_service.PullRequestSynchronized(ctx, pusher, pr)
+
+ // this always seems to be false
isForcePush := comment != nil && comment.IsForcePush
results = append(results, private.HookProcReceiveRefResult{