Skip to content

Commit b45ebc8

Browse files
committed
fix(webhook):with Issue.IsPullRequest()
1 parent 9a5c92c commit b45ebc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/webhook/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func (h *Handler) handleIssueComment(ctx context.Context, w http.ResponseWriter,
203203
// Handle /code command for Issues only (not for PRs)
204204
if strings.HasPrefix(comment, "/code") {
205205
// Check if this is a PR comment, ignore if it is
206-
if event.Issue.PullRequestLinks != nil {
206+
if event.Issue.IsPullRequest() {
207207
log.Infof("Ignoring /code command in PR #%d (use /continue or /fix instead)", issueNumber)
208208
w.WriteHeader(http.StatusOK)
209209
w.Write([]byte("/code command is not supported in PRs, use /continue or /fix instead"))

0 commit comments

Comments
 (0)