feat(web): add merge when ready and auto-merge state to the merge box
- commit
- 5dfb71bb8bc24da1f3014ae2efa9b4526969ef0a
- author
- brice · · 2026-10-20 16:08 UTC
- parent
- 31adb55
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
7 files · +700 -351
M internal/adapters/web/fragments.go +5 -1
| @@ -61,7 +61,7 @@ func liveEvent(we ports.WatchEvent) bool { | |||
| 61 | 61 | } | |
| 62 | 62 | switch we.Event.(type) { | |
| 63 | 63 | case domain.RepoCreated, domain.RepoUpdated, domain.RepoDeleted, domain.PushEvent, | |
| 64 | - | domain.MergeRequestOpened, domain.MergeRequestMerged, domain.MergeRequestClosed, domain.MergeRequestReady, domain.MergeRequestMergeability, domain.CommentAdded, domain.CommentEdited, domain.CommentDeleted, domain.CommentResolved, | |
| 64 | + | domain.MergeRequestOpened, domain.MergeRequestMerged, domain.MergeRequestClosed, domain.MergeRequestReady, domain.MergeRequestAutoMergeEnabled, domain.MergeRequestAutoMergeCancelled, domain.MergeRequestMergeability, domain.CommentAdded, domain.CommentEdited, domain.CommentDeleted, domain.CommentResolved, | |
| 65 | 65 | domain.RunUpdated, domain.JobUpdated, | |
| 66 | 66 | domain.IssueOpened, domain.IssueClosed, domain.IssueReopened, domain.IssueCommented, domain.IssueSubmitted, domain.IssuePendingRemoved: | |
| 67 | 67 | return true | |
| @@ -189,6 +189,10 @@ func (l *liveStream) repoPage(ctx context.Context, we ports.WatchEvent) ([]fragm | |||
| 189 | 189 | return l.mrNotice(ctx, ev.MergeRequest.Number, "this merge request was closed — reload") | |
| 190 | 190 | case domain.MergeRequestReady: | |
| 191 | 191 | return l.mrNotice(ctx, ev.MergeRequest.Number, "this merge request is ready for review — reload") | |
| 192 | + | case domain.MergeRequestAutoMergeEnabled: | |
| 193 | + | return l.mrNotice(ctx, ev.MergeRequest.Number, "auto-merge was enabled — reload") | |
| 194 | + | case domain.MergeRequestAutoMergeCancelled: | |
| 195 | + | return l.mrNotice(ctx, ev.MergeRequest.Number, "auto-merge was cancelled — reload") | |
| 192 | 196 | case domain.MergeRequestMergeability: | |
| 193 | 197 | if l.view != "mr" || strconv.FormatInt(ev.Number, 10) != l.n { | |
| 194 | 198 | return nil, nil | |
| @@ -61,7 +61,7 @@ func liveEvent(we ports.WatchEvent) bool { | |||||
| 61 | } | 61 | } | ||
| 62 | switch we.Event.(type) { | 62 | switch we.Event.(type) { | ||
| 63 | case domain.RepoCreated, domain.RepoUpdated, domain.RepoDeleted, domain.PushEvent, | 63 | case domain.RepoCreated, domain.RepoUpdated, domain.RepoDeleted, domain.PushEvent, | ||
| 64 | - | domain.MergeRequestOpened, domain.MergeRequestMerged, domain.MergeRequestClosed, domain.MergeRequestReady, domain.MergeRequestMergeability, domain.CommentAdded, domain.CommentEdited, domain.CommentDeleted, domain.CommentResolved, | 64 | + | domain.MergeRequestOpened, domain.MergeRequestMerged, domain.MergeRequestClosed, domain.MergeRequestReady, domain.MergeRequestAutoMergeEnabled, domain.MergeRequestAutoMergeCancelled, domain.MergeRequestMergeability, domain.CommentAdded, domain.CommentEdited, domain.CommentDeleted, domain.CommentResolved, |
| 65 | domain.RunUpdated, domain.JobUpdated, | 65 | domain.RunUpdated, domain.JobUpdated, | ||
| 66 | domain.IssueOpened, domain.IssueClosed, domain.IssueReopened, domain.IssueCommented, domain.IssueSubmitted, domain.IssuePendingRemoved: | 66 | domain.IssueOpened, domain.IssueClosed, domain.IssueReopened, domain.IssueCommented, domain.IssueSubmitted, domain.IssuePendingRemoved: | ||
| 67 | return true | 67 | return true | ||
| @@ -189,6 +189,10 @@ func (l *liveStream) repoPage(ctx context.Context, we ports.WatchEvent) ([]fragm | |||||
| 189 | return l.mrNotice(ctx, ev.MergeRequest.Number, "this merge request was closed — reload") | 189 | return l.mrNotice(ctx, ev.MergeRequest.Number, "this merge request was closed — reload") | ||
| 190 | case domain.MergeRequestReady: | 190 | case domain.MergeRequestReady: | ||
| 191 | return l.mrNotice(ctx, ev.MergeRequest.Number, "this merge request is ready for review — reload") | 191 | return l.mrNotice(ctx, ev.MergeRequest.Number, "this merge request is ready for review — reload") | ||
| 192 | + | case domain.MergeRequestAutoMergeEnabled: | |||
| 193 | + | return l.mrNotice(ctx, ev.MergeRequest.Number, "auto-merge was enabled — reload") | |||
| 194 | + | case domain.MergeRequestAutoMergeCancelled: | |||
| 195 | + | return l.mrNotice(ctx, ev.MergeRequest.Number, "auto-merge was cancelled — reload") | |||
| 192 | case domain.MergeRequestMergeability: | 196 | case domain.MergeRequestMergeability: | ||
| 193 | if l.view != "mr" || strconv.FormatInt(ev.Number, 10) != l.n { | 197 | if l.view != "mr" || strconv.FormatInt(ev.Number, 10) != l.n { | ||
| 194 | return nil, nil | 198 | return nil, nil | ||
M internal/adapters/web/mr.go +26 -0
| @@ -11,6 +11,7 @@ import ( | |||
| 11 | 11 | "net/url" | |
| 12 | 12 | "strconv" | |
| 13 | 13 | "strings" | |
| 14 | + | "time" | |
| 14 | 15 | ||
| 15 | 16 | "github.com/a-h/templ" | |
| 16 | 17 | ||
| @@ -202,6 +203,18 @@ type MergeBox struct { | |||
| 202 | 203 | Fingerprint string | |
| 203 | 204 | // Error is why the last merge was refused, shown in the box. | |
| 204 | 205 | Error string | |
| 206 | + | // AutoAction and CancelAutoAction post to the auto-merge routes. | |
| 207 | + | AutoAction, CancelAutoAction string | |
| 208 | + | // CanAutoMerge offers "Merge when ready": the repository allows | |
| 209 | + | // auto-merge and the server has CI to wait for. | |
| 210 | + | CanAutoMerge bool | |
| 211 | + | // AutoMerge is the pending auto-merge, nil when off. | |
| 212 | + | AutoMerge *AutoMergeView | |
| 213 | + | } | |
| 214 | + | ||
| 215 | + | // AutoMergeView is a pending auto-merge, ready to show. | |
| 216 | + | type AutoMergeView struct { | |
| 217 | + | Mode, EnabledBy, When, WhenAt, HeadShort string | |
| 205 | 218 | } | |
| 206 | 219 | ||
| 207 | 220 | // ModeOption is a merge mode the repository allows. Disabled says that the | |
| @@ -666,9 +679,20 @@ func (s *Server) mrBox(ctx context.Context, d *repoData, res ports.MergeRequestD | |||
| 666 | 679 | if m.IsDraft() { | |
| 667 | 680 | box.ReadyAction = mrHref(d.name(), m.Number, "ready") | |
| 668 | 681 | } | |
| 682 | + | box.AutoMerge = autoMergeView(s.cfg.Now(), m.AutoMerge) | |
| 669 | 683 | return box | |
| 670 | 684 | } | |
| 671 | 685 | ||
| 686 | + | // autoMergeView is the pending auto-merge ready to show, nil when off. | |
| 687 | + | func autoMergeView(now time.Time, am *domain.AutoMerge) *AutoMergeView { | |
| 688 | + | if am == nil { | |
| 689 | + | return nil | |
| 690 | + | } | |
| 691 | + | v := &AutoMergeView{Mode: am.Mode.String(), EnabledBy: am.EnablerLabel, HeadShort: short(am.HeadID.String())} | |
| 692 | + | v.When, v.WhenAt = whenOf(now, am.EnabledAt) | |
| 693 | + | return v | |
| 694 | + | } | |
| 695 | + | ||
| 672 | 696 | // mrFacts formats the description, metadata, branch links and checks. | |
| 673 | 697 | func (s *Server) mrFacts(ctx context.Context, r *http.Request, d *repoData, p *MRPage, res ports.MergeRequestDetail) error { | |
| 674 | 698 | m := res.MergeRequest | |
| @@ -790,6 +814,8 @@ func (s *Server) mergeBox(d *repoData, n int64, source, head string, canMarkRead | |||
| 790 | 814 | CanMarkRead: canMarkRead, | |
| 791 | 815 | CanDeleteBranch: source != d.repo.DefaultBranch, | |
| 792 | 816 | Mergeability: mg, | |
| 817 | + | AutoAction: mrHref(d.name(), n, "auto-merge"), CancelAutoAction: mrHref(d.name(), n, "auto-merge/cancel"), | |
| 818 | + | CanAutoMerge: d.repo.Settings.AllowAutoMerge && s.cfg.Runs != nil, | |
| 793 | 819 | } | |
| 794 | 820 | var lines []string | |
| 795 | 821 | cmd := "" | |
| @@ -11,6 +11,7 @@ import ( | |||||
| 11 | "net/url" | 11 | "net/url" | ||
| 12 | "strconv" | 12 | "strconv" | ||
| 13 | "strings" | 13 | "strings" | ||
| 14 | + | "time" | |||
| 14 | 15 | ||||
| 15 | "github.com/a-h/templ" | 16 | "github.com/a-h/templ" | ||
| 16 | 17 | ||||
| @@ -202,6 +203,18 @@ type MergeBox struct { | |||||
| 202 | Fingerprint string | 203 | Fingerprint string | ||
| 203 | // Error is why the last merge was refused, shown in the box. | 204 | // Error is why the last merge was refused, shown in the box. | ||
| 204 | Error string | 205 | Error string | ||
| 206 | + | // AutoAction and CancelAutoAction post to the auto-merge routes. | |||
| 207 | + | AutoAction, CancelAutoAction string | |||
| 208 | + | // CanAutoMerge offers "Merge when ready": the repository allows | |||
| 209 | + | // auto-merge and the server has CI to wait for. | |||
| 210 | + | CanAutoMerge bool | |||
| 211 | + | // AutoMerge is the pending auto-merge, nil when off. | |||
| 212 | + | AutoMerge *AutoMergeView | |||
| 213 | + | } | |||
| 214 | + | ||||
| 215 | + | // AutoMergeView is a pending auto-merge, ready to show. | |||
| 216 | + | type AutoMergeView struct { | |||
| 217 | + | Mode, EnabledBy, When, WhenAt, HeadShort string | |||
| 205 | } | 218 | } | ||
| 206 | 219 | ||||
| 207 | // ModeOption is a merge mode the repository allows. Disabled says that the | 220 | // ModeOption is a merge mode the repository allows. Disabled says that the | ||
| @@ -666,9 +679,20 @@ func (s *Server) mrBox(ctx context.Context, d *repoData, res ports.MergeRequestD | |||||
| 666 | if m.IsDraft() { | 679 | if m.IsDraft() { | ||
| 667 | box.ReadyAction = mrHref(d.name(), m.Number, "ready") | 680 | box.ReadyAction = mrHref(d.name(), m.Number, "ready") | ||
| 668 | } | 681 | } | ||
| 682 | + | box.AutoMerge = autoMergeView(s.cfg.Now(), m.AutoMerge) | |||
| 669 | return box | 683 | return box | ||
| 670 | } | 684 | } | ||
| 671 | 685 | ||||
| 686 | + | // autoMergeView is the pending auto-merge ready to show, nil when off. | |||
| 687 | + | func autoMergeView(now time.Time, am *domain.AutoMerge) *AutoMergeView { | |||
| 688 | + | if am == nil { | |||
| 689 | + | return nil | |||
| 690 | + | } | |||
| 691 | + | v := &AutoMergeView{Mode: am.Mode.String(), EnabledBy: am.EnablerLabel, HeadShort: short(am.HeadID.String())} | |||
| 692 | + | v.When, v.WhenAt = whenOf(now, am.EnabledAt) | |||
| 693 | + | return v | |||
| 694 | + | } | |||
| 695 | + | ||||
| 672 | // mrFacts formats the description, metadata, branch links and checks. | 696 | // mrFacts formats the description, metadata, branch links and checks. | ||
| 673 | func (s *Server) mrFacts(ctx context.Context, r *http.Request, d *repoData, p *MRPage, res ports.MergeRequestDetail) error { | 697 | func (s *Server) mrFacts(ctx context.Context, r *http.Request, d *repoData, p *MRPage, res ports.MergeRequestDetail) error { | ||
| 674 | m := res.MergeRequest | 698 | m := res.MergeRequest | ||
| @@ -790,6 +814,8 @@ func (s *Server) mergeBox(d *repoData, n int64, source, head string, canMarkRead | |||||
| 790 | CanMarkRead: canMarkRead, | 814 | CanMarkRead: canMarkRead, | ||
| 791 | CanDeleteBranch: source != d.repo.DefaultBranch, | 815 | CanDeleteBranch: source != d.repo.DefaultBranch, | ||
| 792 | Mergeability: mg, | 816 | Mergeability: mg, | ||
| 817 | + | AutoAction: mrHref(d.name(), n, "auto-merge"), CancelAutoAction: mrHref(d.name(), n, "auto-merge/cancel"), | |||
| 818 | + | CanAutoMerge: d.repo.Settings.AllowAutoMerge && s.cfg.Runs != nil, | |||
| 793 | } | 819 | } | ||
| 794 | var lines []string | 820 | var lines []string | ||
| 795 | cmd := "" | 821 | cmd := "" | ||
M internal/adapters/web/mr.templ +23 -0
| @@ -508,6 +508,20 @@ templ mergeMenu(p MRPage) { | |||
| 508 | 508 | </form> | |
| 509 | 509 | } else if !p.Box.HeadGone { | |
| 510 | 510 | @mrMergeabilitySlot(p.Box.Mergeability) | |
| 511 | + | if p.Box.AutoMerge != nil { | |
| 512 | + | <form class="d-acts" method="post" action={ templ.SafeURL(p.Box.CancelAutoAction) }> | |
| 513 | + | <p class="dim" role="status"> | |
| 514 | + | Auto-merge: { p.Box.AutoMerge.Mode } when ready, enabled by { p.Box.AutoMerge.EnabledBy } | |
| 515 | + | if p.Box.AutoMerge.When != "" { | |
| 516 | + | { " " }<time datetime={ p.Box.AutoMerge.WhenAt }>{ p.Box.AutoMerge.When }</time> | |
| 517 | + | } | |
| 518 | + | { " " }(head { p.Box.AutoMerge.HeadShort }) | |
| 519 | + | </p> | |
| 520 | + | <div class="d-btns"> | |
| 521 | + | <button type="submit" class="btn">Cancel auto-merge</button> | |
| 522 | + | </div> | |
| 523 | + | </form> | |
| 524 | + | } | |
| 511 | 525 | <form class="d-acts" method="post" action={ templ.SafeURL(p.Box.MergeAction) }> | |
| 512 | 526 | <input type="hidden" name="head_id" value={ p.Box.Head }/> | |
| 513 | 527 | <fieldset class="d-modes"> | |
| @@ -544,6 +558,15 @@ templ mergeMenu(p MRPage) { | |||
| 544 | 558 | :disabled="!this.form.querySelector('input[name=mode]:checked:not(:disabled)')" | |
| 545 | 559 | :title="(this.form.querySelector('input[name=mode]:checked') || {}).title || ''" | |
| 546 | 560 | >Merge into { p.Target }</button> | |
| 561 | + | if p.Box.CanAutoMerge { | |
| 562 | + | <button | |
| 563 | + | type="submit" | |
| 564 | + | class="btn" | |
| 565 | + | formaction={ templ.SafeURL(p.Box.AutoAction) } | |
| 566 | + | disabled?={ len(p.Box.Modes) == 0 } | |
| 567 | + | title="merge once the checks pass" | |
| 568 | + | >Merge when ready</button> | |
| 569 | + | } | |
| 547 | 570 | </div> | |
| 548 | 571 | </form> | |
| 549 | 572 | } | |
| @@ -508,6 +508,20 @@ templ mergeMenu(p MRPage) { | |||||
| 508 | </form> | 508 | </form> | ||
| 509 | } else if !p.Box.HeadGone { | 509 | } else if !p.Box.HeadGone { | ||
| 510 | @mrMergeabilitySlot(p.Box.Mergeability) | 510 | @mrMergeabilitySlot(p.Box.Mergeability) | ||
| 511 | + | if p.Box.AutoMerge != nil { | |||
| 512 | + | <form class="d-acts" method="post" action={ templ.SafeURL(p.Box.CancelAutoAction) }> | |||
| 513 | + | <p class="dim" role="status"> | |||
| 514 | + | Auto-merge: { p.Box.AutoMerge.Mode } when ready, enabled by { p.Box.AutoMerge.EnabledBy } | |||
| 515 | + | if p.Box.AutoMerge.When != "" { | |||
| 516 | + | { " " }<time datetime={ p.Box.AutoMerge.WhenAt }>{ p.Box.AutoMerge.When }</time> | |||
| 517 | + | } | |||
| 518 | + | { " " }(head { p.Box.AutoMerge.HeadShort }) | |||
| 519 | + | </p> | |||
| 520 | + | <div class="d-btns"> | |||
| 521 | + | <button type="submit" class="btn">Cancel auto-merge</button> | |||
| 522 | + | </div> | |||
| 523 | + | </form> | |||
| 524 | + | } | |||
| 511 | <form class="d-acts" method="post" action={ templ.SafeURL(p.Box.MergeAction) }> | 525 | <form class="d-acts" method="post" action={ templ.SafeURL(p.Box.MergeAction) }> | ||
| 512 | <input type="hidden" name="head_id" value={ p.Box.Head }/> | 526 | <input type="hidden" name="head_id" value={ p.Box.Head }/> | ||
| 513 | <fieldset class="d-modes"> | 527 | <fieldset class="d-modes"> | ||
| @@ -544,6 +558,15 @@ templ mergeMenu(p MRPage) { | |||||
| 544 | :disabled="!this.form.querySelector('input[name=mode]:checked:not(:disabled)')" | 558 | :disabled="!this.form.querySelector('input[name=mode]:checked:not(:disabled)')" | ||
| 545 | :title="(this.form.querySelector('input[name=mode]:checked') || {}).title || ''" | 559 | :title="(this.form.querySelector('input[name=mode]:checked') || {}).title || ''" | ||
| 546 | >Merge into { p.Target }</button> | 560 | >Merge into { p.Target }</button> | ||
| 561 | + | if p.Box.CanAutoMerge { | |||
| 562 | + | <button | |||
| 563 | + | type="submit" | |||
| 564 | + | class="btn" | |||
| 565 | + | formaction={ templ.SafeURL(p.Box.AutoAction) } | |||
| 566 | + | disabled?={ len(p.Box.Modes) == 0 } | |||
| 567 | + | title="merge once the checks pass" | |||
| 568 | + | >Merge when ready</button> | |||
| 569 | + | } | |||
| 547 | </div> | 570 | </div> | ||
| 548 | </form> | 571 | </form> | ||
| 549 | } | 572 | } | ||
M internal/adapters/web/mr_post.go +62 -0
| @@ -391,6 +391,68 @@ func (s *Server) mrMerge(ctx context.Context, r *http.Request) (string, string, | |||
| 391 | 391 | return back, back, nil | |
| 392 | 392 | } | |
| 393 | 393 | ||
| 394 | + | // mrAutoMerge is POST /<repo>/merge-requests/<n>/auto-merge: the form of the | |
| 395 | + | // merge (mode, head_id) asks to merge once the checks pass. The server records | |
| 396 | + | // the head as it is when it enables (the params carry no head); head_id is only | |
| 397 | + | // validated. | |
| 398 | + | func (s *Server) mrAutoMerge(ctx context.Context, r *http.Request) (string, string, error) { | |
| 399 | + | repo := r.PathValue("repo") | |
| 400 | + | n, err := number(r) | |
| 401 | + | if err != nil { | |
| 402 | + | return "", "", err | |
| 403 | + | } | |
| 404 | + | back := mrHref(repo, n) | |
| 405 | + | var mode domain.MergeMode | |
| 406 | + | switch r.PostFormValue("mode") { | |
| 407 | + | case "fast-forward": | |
| 408 | + | mode = domain.MergeModeFastForward | |
| 409 | + | case "squash": | |
| 410 | + | mode = domain.MergeModeSquash | |
| 411 | + | case "merge": | |
| 412 | + | mode = domain.MergeModeMerge | |
| 413 | + | default: | |
| 414 | + | err := formError("mode must be fast-forward, squash or merge") | |
| 415 | + | return "", back, &rerender{status: http.StatusBadRequest, msg: err.Error(), err: err} | |
| 416 | + | } | |
| 417 | + | name, err := domain.ParseRepoName(repo) | |
| 418 | + | if err != nil { | |
| 419 | + | return "", back, err | |
| 420 | + | } | |
| 421 | + | if _, err := headID(r.PostFormValue("head_id")); err != nil { | |
| 422 | + | return "", back, err | |
| 423 | + | } | |
| 424 | + | _, err = s.cfg.MergeRequests.EnableAutoMerge(ctx, principal(ctx), name, n, ports.EnableAutoMergeParams{Mode: mode}) | |
| 425 | + | switch { | |
| 426 | + | case errors.Is(err, domain.ErrPreconditionFailed), errors.Is(err, domain.ErrConflict): | |
| 427 | + | return "", back, &rerender{status: http.StatusConflict, msg: rule(err.Error(), "the merge request is not in a state that allows this."), err: err} | |
| 428 | + | case err != nil: | |
| 429 | + | return "", back, err | |
| 430 | + | } | |
| 431 | + | return back, back, nil | |
| 432 | + | } | |
| 433 | + | ||
| 434 | + | // mrCancelAutoMerge is POST /<repo>/merge-requests/<n>/auto-merge/cancel. | |
| 435 | + | func (s *Server) mrCancelAutoMerge(ctx context.Context, r *http.Request) (string, string, error) { | |
| 436 | + | repo := r.PathValue("repo") | |
| 437 | + | n, err := number(r) | |
| 438 | + | if err != nil { | |
| 439 | + | return "", "", err | |
| 440 | + | } | |
| 441 | + | back := mrHref(repo, n) | |
| 442 | + | name, err := domain.ParseRepoName(repo) | |
| 443 | + | if err != nil { | |
| 444 | + | return "", back, err | |
| 445 | + | } | |
| 446 | + | _, err = s.cfg.MergeRequests.CancelAutoMerge(ctx, principal(ctx), name, n) | |
| 447 | + | switch { | |
| 448 | + | case errors.Is(err, domain.ErrPreconditionFailed), errors.Is(err, domain.ErrConflict): | |
| 449 | + | return "", back, &rerender{status: http.StatusConflict, msg: rule(err.Error(), "the merge request is not in a state that allows this."), err: err} | |
| 450 | + | case err != nil: | |
| 451 | + | return "", back, err | |
| 452 | + | } | |
| 453 | + | return back, back, nil | |
| 454 | + | } | |
| 455 | + | ||
| 394 | 456 | // mrRead is POST /<repo>/merge-requests/<n>/read: the owner marks the head | |
| 395 | 457 | // they were shown as read. Reading a page never does it (see the top of mr.go). | |
| 396 | 458 | func (s *Server) mrRead(ctx context.Context, r *http.Request) (string, string, error) { | |
| @@ -391,6 +391,68 @@ func (s *Server) mrMerge(ctx context.Context, r *http.Request) (string, string, | |||||
| 391 | return back, back, nil | 391 | return back, back, nil | ||
| 392 | } | 392 | } | ||
| 393 | 393 | ||||
| 394 | + | // mrAutoMerge is POST /<repo>/merge-requests/<n>/auto-merge: the form of the | |||
| 395 | + | // merge (mode, head_id) asks to merge once the checks pass. The server records | |||
| 396 | + | // the head as it is when it enables (the params carry no head); head_id is only | |||
| 397 | + | // validated. | |||
| 398 | + | func (s *Server) mrAutoMerge(ctx context.Context, r *http.Request) (string, string, error) { | |||
| 399 | + | repo := r.PathValue("repo") | |||
| 400 | + | n, err := number(r) | |||
| 401 | + | if err != nil { | |||
| 402 | + | return "", "", err | |||
| 403 | + | } | |||
| 404 | + | back := mrHref(repo, n) | |||
| 405 | + | var mode domain.MergeMode | |||
| 406 | + | switch r.PostFormValue("mode") { | |||
| 407 | + | case "fast-forward": | |||
| 408 | + | mode = domain.MergeModeFastForward | |||
| 409 | + | case "squash": | |||
| 410 | + | mode = domain.MergeModeSquash | |||
| 411 | + | case "merge": | |||
| 412 | + | mode = domain.MergeModeMerge | |||
| 413 | + | default: | |||
| 414 | + | err := formError("mode must be fast-forward, squash or merge") | |||
| 415 | + | return "", back, &rerender{status: http.StatusBadRequest, msg: err.Error(), err: err} | |||
| 416 | + | } | |||
| 417 | + | name, err := domain.ParseRepoName(repo) | |||
| 418 | + | if err != nil { | |||
| 419 | + | return "", back, err | |||
| 420 | + | } | |||
| 421 | + | if _, err := headID(r.PostFormValue("head_id")); err != nil { | |||
| 422 | + | return "", back, err | |||
| 423 | + | } | |||
| 424 | + | _, err = s.cfg.MergeRequests.EnableAutoMerge(ctx, principal(ctx), name, n, ports.EnableAutoMergeParams{Mode: mode}) | |||
| 425 | + | switch { | |||
| 426 | + | case errors.Is(err, domain.ErrPreconditionFailed), errors.Is(err, domain.ErrConflict): | |||
| 427 | + | return "", back, &rerender{status: http.StatusConflict, msg: rule(err.Error(), "the merge request is not in a state that allows this."), err: err} | |||
| 428 | + | case err != nil: | |||
| 429 | + | return "", back, err | |||
| 430 | + | } | |||
| 431 | + | return back, back, nil | |||
| 432 | + | } | |||
| 433 | + | ||||
| 434 | + | // mrCancelAutoMerge is POST /<repo>/merge-requests/<n>/auto-merge/cancel. | |||
| 435 | + | func (s *Server) mrCancelAutoMerge(ctx context.Context, r *http.Request) (string, string, error) { | |||
| 436 | + | repo := r.PathValue("repo") | |||
| 437 | + | n, err := number(r) | |||
| 438 | + | if err != nil { | |||
| 439 | + | return "", "", err | |||
| 440 | + | } | |||
| 441 | + | back := mrHref(repo, n) | |||
| 442 | + | name, err := domain.ParseRepoName(repo) | |||
| 443 | + | if err != nil { | |||
| 444 | + | return "", back, err | |||
| 445 | + | } | |||
| 446 | + | _, err = s.cfg.MergeRequests.CancelAutoMerge(ctx, principal(ctx), name, n) | |||
| 447 | + | switch { | |||
| 448 | + | case errors.Is(err, domain.ErrPreconditionFailed), errors.Is(err, domain.ErrConflict): | |||
| 449 | + | return "", back, &rerender{status: http.StatusConflict, msg: rule(err.Error(), "the merge request is not in a state that allows this."), err: err} | |||
| 450 | + | case err != nil: | |||
| 451 | + | return "", back, err | |||
| 452 | + | } | |||
| 453 | + | return back, back, nil | |||
| 454 | + | } | |||
| 455 | + | ||||
| 394 | // mrRead is POST /<repo>/merge-requests/<n>/read: the owner marks the head | 456 | // mrRead is POST /<repo>/merge-requests/<n>/read: the owner marks the head | ||
| 395 | // they were shown as read. Reading a page never does it (see the top of mr.go). | 457 | // they were shown as read. Reading a page never does it (see the top of mr.go). | ||
| 396 | func (s *Server) mrRead(ctx context.Context, r *http.Request) (string, string, error) { | 458 | func (s *Server) mrRead(ctx context.Context, r *http.Request) (string, string, error) { | ||
M internal/adapters/web/mr_templ.go +499 -350
| @@ -2571,185 +2571,334 @@ func mergeMenu(p MRPage) templ.Component { | |||
| 2571 | 2571 | if templ_7745c5c3_Err != nil { | |
| 2572 | 2572 | return templ_7745c5c3_Err | |
| 2573 | 2573 | } | |
| 2574 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 240, " <form class=\"d-acts\" method=\"post\" action=\"") | |
| 2574 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 240, " ") | |
| 2575 | 2575 | if templ_7745c5c3_Err != nil { | |
| 2576 | 2576 | return templ_7745c5c3_Err | |
| 2577 | 2577 | } | |
| 2578 | - | var templ_7745c5c3_Var120 templ.SafeURL | |
| 2579 | - | templ_7745c5c3_Var120, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.MergeAction)) | |
| 2578 | + | if p.Box.AutoMerge != nil { | |
| 2579 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 241, "<form class=\"d-acts\" method=\"post\" action=\"") | |
| 2580 | + | if templ_7745c5c3_Err != nil { | |
| 2581 | + | return templ_7745c5c3_Err | |
| 2582 | + | } | |
| 2583 | + | var templ_7745c5c3_Var120 templ.SafeURL | |
| 2584 | + | templ_7745c5c3_Var120, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.CancelAutoAction)) | |
| 2585 | + | if templ_7745c5c3_Err != nil { | |
| 2586 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 512, Col: 86} | |
| 2587 | + | } | |
| 2588 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var120)) | |
| 2589 | + | if templ_7745c5c3_Err != nil { | |
| 2590 | + | return templ_7745c5c3_Err | |
| 2591 | + | } | |
| 2592 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, "\"><p class=\"dim\" role=\"status\">Auto-merge: ") | |
| 2593 | + | if templ_7745c5c3_Err != nil { | |
| 2594 | + | return templ_7745c5c3_Err | |
| 2595 | + | } | |
| 2596 | + | var templ_7745c5c3_Var121 string | |
| 2597 | + | templ_7745c5c3_Var121, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.AutoMerge.Mode) | |
| 2598 | + | if templ_7745c5c3_Err != nil { | |
| 2599 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 514, Col: 41} | |
| 2600 | + | } | |
| 2601 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var121)) | |
| 2602 | + | if templ_7745c5c3_Err != nil { | |
| 2603 | + | return templ_7745c5c3_Err | |
| 2604 | + | } | |
| 2605 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 243, " when ready, enabled by ") | |
| 2606 | + | if templ_7745c5c3_Err != nil { | |
| 2607 | + | return templ_7745c5c3_Err | |
| 2608 | + | } | |
| 2609 | + | var templ_7745c5c3_Var122 string | |
| 2610 | + | templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.AutoMerge.EnabledBy) | |
| 2611 | + | if templ_7745c5c3_Err != nil { | |
| 2612 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 514, Col: 94} | |
| 2613 | + | } | |
| 2614 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var122)) | |
| 2615 | + | if templ_7745c5c3_Err != nil { | |
| 2616 | + | return templ_7745c5c3_Err | |
| 2617 | + | } | |
| 2618 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, " ") | |
| 2619 | + | if templ_7745c5c3_Err != nil { | |
| 2620 | + | return templ_7745c5c3_Err | |
| 2621 | + | } | |
| 2622 | + | if p.Box.AutoMerge.When != "" { | |
| 2623 | + | var templ_7745c5c3_Var123 string | |
| 2624 | + | templ_7745c5c3_Var123, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |
| 2625 | + | if templ_7745c5c3_Err != nil { | |
| 2626 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 516, Col: 13} | |
| 2627 | + | } | |
| 2628 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var123)) | |
| 2629 | + | if templ_7745c5c3_Err != nil { | |
| 2630 | + | return templ_7745c5c3_Err | |
| 2631 | + | } | |
| 2632 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 245, "<time datetime=\"") | |
| 2633 | + | if templ_7745c5c3_Err != nil { | |
| 2634 | + | return templ_7745c5c3_Err | |
| 2635 | + | } | |
| 2636 | + | var templ_7745c5c3_Var124 string | |
| 2637 | + | templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.AutoMerge.WhenAt) | |
| 2638 | + | if templ_7745c5c3_Err != nil { | |
| 2639 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 516, Col: 54} | |
| 2640 | + | } | |
| 2641 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var124) | |
| 2642 | + | if templ_7745c5c3_Err != nil { | |
| 2643 | + | return templ_7745c5c3_Err | |
| 2644 | + | } | |
| 2645 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 246, "\">") | |
| 2646 | + | if templ_7745c5c3_Err != nil { | |
| 2647 | + | return templ_7745c5c3_Err | |
| 2648 | + | } | |
| 2649 | + | var templ_7745c5c3_Var125 string | |
| 2650 | + | templ_7745c5c3_Var125, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.AutoMerge.When) | |
| 2651 | + | if templ_7745c5c3_Err != nil { | |
| 2652 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 516, Col: 79} | |
| 2653 | + | } | |
| 2654 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125)) | |
| 2655 | + | if templ_7745c5c3_Err != nil { | |
| 2656 | + | return templ_7745c5c3_Err | |
| 2657 | + | } | |
| 2658 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 247, "</time> ") | |
| 2659 | + | if templ_7745c5c3_Err != nil { | |
| 2660 | + | return templ_7745c5c3_Err | |
| 2661 | + | } | |
| 2662 | + | } | |
| 2663 | + | var templ_7745c5c3_Var126 string | |
| 2664 | + | templ_7745c5c3_Var126, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |
| 2665 | + | if templ_7745c5c3_Err != nil { | |
| 2666 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 518, Col: 12} | |
| 2667 | + | } | |
| 2668 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var126)) | |
| 2669 | + | if templ_7745c5c3_Err != nil { | |
| 2670 | + | return templ_7745c5c3_Err | |
| 2671 | + | } | |
| 2672 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 248, "(head ") | |
| 2673 | + | if templ_7745c5c3_Err != nil { | |
| 2674 | + | return templ_7745c5c3_Err | |
| 2675 | + | } | |
| 2676 | + | var templ_7745c5c3_Var127 string | |
| 2677 | + | templ_7745c5c3_Var127, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.AutoMerge.HeadShort) | |
| 2678 | + | if templ_7745c5c3_Err != nil { | |
| 2679 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 518, Col: 47} | |
| 2680 | + | } | |
| 2681 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var127)) | |
| 2682 | + | if templ_7745c5c3_Err != nil { | |
| 2683 | + | return templ_7745c5c3_Err | |
| 2684 | + | } | |
| 2685 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 249, ")</p><div class=\"d-btns\"><button type=\"submit\" class=\"btn\">Cancel auto-merge</button></div></form>") | |
| 2686 | + | if templ_7745c5c3_Err != nil { | |
| 2687 | + | return templ_7745c5c3_Err | |
| 2688 | + | } | |
| 2689 | + | } | |
| 2690 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 250, " <form class=\"d-acts\" method=\"post\" action=\"") | |
| 2580 | 2691 | if templ_7745c5c3_Err != nil { | |
| 2581 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 511, Col: 80} | |
| 2692 | + | return templ_7745c5c3_Err | |
| 2693 | + | } | |
| 2694 | + | var templ_7745c5c3_Var128 templ.SafeURL | |
| 2695 | + | templ_7745c5c3_Var128, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.MergeAction)) | |
| 2696 | + | if templ_7745c5c3_Err != nil { | |
| 2697 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 525, Col: 80} | |
| 2582 | 2698 | } | |
| 2583 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var120)) | |
| 2699 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var128)) | |
| 2584 | 2700 | if templ_7745c5c3_Err != nil { | |
| 2585 | 2701 | return templ_7745c5c3_Err | |
| 2586 | 2702 | } | |
| 2587 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 241, "\"><input type=\"hidden\" name=\"head_id\" value=\"") | |
| 2703 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 251, "\"><input type=\"hidden\" name=\"head_id\" value=\"") | |
| 2588 | 2704 | if templ_7745c5c3_Err != nil { | |
| 2589 | 2705 | return templ_7745c5c3_Err | |
| 2590 | 2706 | } | |
| 2591 | - | var templ_7745c5c3_Var121 string | |
| 2592 | - | templ_7745c5c3_Var121, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.Head) | |
| 2707 | + | var templ_7745c5c3_Var129 string | |
| 2708 | + | templ_7745c5c3_Var129, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.Head) | |
| 2593 | 2709 | if templ_7745c5c3_Err != nil { | |
| 2594 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 512, Col: 59} | |
| 2710 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 526, Col: 59} | |
| 2595 | 2711 | } | |
| 2596 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var121) | |
| 2712 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var129) | |
| 2597 | 2713 | if templ_7745c5c3_Err != nil { | |
| 2598 | 2714 | return templ_7745c5c3_Err | |
| 2599 | 2715 | } | |
| 2600 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, "\"><fieldset class=\"d-modes\"><legend class=\"sr\">merge mode</legend> ") | |
| 2716 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 252, "\"><fieldset class=\"d-modes\"><legend class=\"sr\">merge mode</legend> ") | |
| 2601 | 2717 | if templ_7745c5c3_Err != nil { | |
| 2602 | 2718 | return templ_7745c5c3_Err | |
| 2603 | 2719 | } | |
| 2604 | 2720 | for i, m := range p.Box.Modes { | |
| 2605 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 243, "<label><input type=\"radio\" name=\"mode\" value=\"") | |
| 2721 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 253, "<label><input type=\"radio\" name=\"mode\" value=\"") | |
| 2606 | 2722 | if templ_7745c5c3_Err != nil { | |
| 2607 | 2723 | return templ_7745c5c3_Err | |
| 2608 | 2724 | } | |
| 2609 | - | var templ_7745c5c3_Var122 string | |
| 2610 | - | templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.ResolveAttributeValue(m.Value) | |
| 2725 | + | var templ_7745c5c3_Var130 string | |
| 2726 | + | templ_7745c5c3_Var130, templ_7745c5c3_Err = templ.ResolveAttributeValue(m.Value) | |
| 2611 | 2727 | if templ_7745c5c3_Err != nil { | |
| 2612 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 520, Col: 24} | |
| 2728 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 534, Col: 24} | |
| 2613 | 2729 | } | |
| 2614 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var122) | |
| 2730 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var130) | |
| 2615 | 2731 | if templ_7745c5c3_Err != nil { | |
| 2616 | 2732 | return templ_7745c5c3_Err | |
| 2617 | 2733 | } | |
| 2618 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, "\"") | |
| 2734 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 254, "\"") | |
| 2619 | 2735 | if templ_7745c5c3_Err != nil { | |
| 2620 | 2736 | return templ_7745c5c3_Err | |
| 2621 | 2737 | } | |
| 2622 | 2738 | if i == p.Box.Checked() { | |
| 2623 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 245, " checked") | |
| 2739 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 255, " checked") | |
| 2624 | 2740 | if templ_7745c5c3_Err != nil { | |
| 2625 | 2741 | return templ_7745c5c3_Err | |
| 2626 | 2742 | } | |
| 2627 | 2743 | } | |
| 2628 | 2744 | if m.Disabled { | |
| 2629 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 246, " disabled") | |
| 2745 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 256, " disabled") | |
| 2630 | 2746 | if templ_7745c5c3_Err != nil { | |
| 2631 | 2747 | return templ_7745c5c3_Err | |
| 2632 | 2748 | } | |
| 2633 | 2749 | } | |
| 2634 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 247, " title=\"") | |
| 2750 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 257, " title=\"") | |
| 2635 | 2751 | if templ_7745c5c3_Err != nil { | |
| 2636 | 2752 | return templ_7745c5c3_Err | |
| 2637 | 2753 | } | |
| 2638 | - | var templ_7745c5c3_Var123 string | |
| 2639 | - | templ_7745c5c3_Var123, templ_7745c5c3_Err = templ.ResolveAttributeValue(m.Reason) | |
| 2754 | + | var templ_7745c5c3_Var131 string | |
| 2755 | + | templ_7745c5c3_Var131, templ_7745c5c3_Err = templ.ResolveAttributeValue(m.Reason) | |
| 2640 | 2756 | if templ_7745c5c3_Err != nil { | |
| 2641 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 523, Col: 25} | |
| 2757 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 537, Col: 25} | |
| 2642 | 2758 | } | |
| 2643 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var123) | |
| 2759 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var131) | |
| 2644 | 2760 | if templ_7745c5c3_Err != nil { | |
| 2645 | 2761 | return templ_7745c5c3_Err | |
| 2646 | 2762 | } | |
| 2647 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 248, "\" :disabled=\"this.value === 'fast-forward' ? q('[data-mergeability]').data.ffOk !== true : q('[data-mergeability]').data.mergeOk !== true\" :title=\"this.value === 'fast-forward' ? q('[data-mergeability]').data.ffReason : q('[data-mergeability]').data.mergeReason\"> ") | |
| 2763 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 258, "\" :disabled=\"this.value === 'fast-forward' ? q('[data-mergeability]').data.ffOk !== true : q('[data-mergeability]').data.mergeOk !== true\" :title=\"this.value === 'fast-forward' ? q('[data-mergeability]').data.ffReason : q('[data-mergeability]').data.mergeReason\"> ") | |
| 2648 | 2764 | if templ_7745c5c3_Err != nil { | |
| 2649 | 2765 | return templ_7745c5c3_Err | |
| 2650 | 2766 | } | |
| 2651 | - | var templ_7745c5c3_Var124 string | |
| 2652 | - | templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.JoinStringErrs(m.Label) | |
| 2767 | + | var templ_7745c5c3_Var132 string | |
| 2768 | + | templ_7745c5c3_Var132, templ_7745c5c3_Err = templ.JoinStringErrs(m.Label) | |
| 2653 | 2769 | if templ_7745c5c3_Err != nil { | |
| 2654 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 527, Col: 17} | |
| 2770 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 541, Col: 17} | |
| 2655 | 2771 | } | |
| 2656 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var124)) | |
| 2772 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var132)) | |
| 2657 | 2773 | if templ_7745c5c3_Err != nil { | |
| 2658 | 2774 | return templ_7745c5c3_Err | |
| 2659 | 2775 | } | |
| 2660 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 249, " ") | |
| 2776 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 259, " ") | |
| 2661 | 2777 | if templ_7745c5c3_Err != nil { | |
| 2662 | 2778 | return templ_7745c5c3_Err | |
| 2663 | 2779 | } | |
| 2664 | 2780 | if i < 9 { | |
| 2665 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 250, "<kbd aria-hidden=\"true\">") | |
| 2781 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 260, "<kbd aria-hidden=\"true\">") | |
| 2666 | 2782 | if templ_7745c5c3_Err != nil { | |
| 2667 | 2783 | return templ_7745c5c3_Err | |
| 2668 | 2784 | } | |
| 2669 | - | var templ_7745c5c3_Var125 string | |
| 2670 | - | templ_7745c5c3_Var125, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(i + 1)) | |
| 2785 | + | var templ_7745c5c3_Var133 string | |
| 2786 | + | templ_7745c5c3_Var133, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(i + 1)) | |
| 2671 | 2787 | if templ_7745c5c3_Err != nil { | |
| 2672 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 529, Col: 46} | |
| 2788 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 543, Col: 46} | |
| 2673 | 2789 | } | |
| 2674 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125)) | |
| 2790 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var133)) | |
| 2675 | 2791 | if templ_7745c5c3_Err != nil { | |
| 2676 | 2792 | return templ_7745c5c3_Err | |
| 2677 | 2793 | } | |
| 2678 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 251, "</kbd>") | |
| 2794 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 261, "</kbd>") | |
| 2679 | 2795 | if templ_7745c5c3_Err != nil { | |
| 2680 | 2796 | return templ_7745c5c3_Err | |
| 2681 | 2797 | } | |
| 2682 | 2798 | } | |
| 2683 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 252, "</label>") | |
| 2799 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 262, "</label>") | |
| 2684 | 2800 | if templ_7745c5c3_Err != nil { | |
| 2685 | 2801 | return templ_7745c5c3_Err | |
| 2686 | 2802 | } | |
| 2687 | 2803 | } | |
| 2688 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 253, "</fieldset>") | |
| 2804 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 263, "</fieldset>") | |
| 2689 | 2805 | if templ_7745c5c3_Err != nil { | |
| 2690 | 2806 | return templ_7745c5c3_Err | |
| 2691 | 2807 | } | |
| 2692 | 2808 | if p.Box.CanDeleteBranch { | |
| 2693 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 254, "<label class=\"d-check\"><input type=\"checkbox\" name=\"delete_branch\" value=\"1\"> delete ") | |
| 2809 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 264, "<label class=\"d-check\"><input type=\"checkbox\" name=\"delete_branch\" value=\"1\"> delete ") | |
| 2694 | 2810 | if templ_7745c5c3_Err != nil { | |
| 2695 | 2811 | return templ_7745c5c3_Err | |
| 2696 | 2812 | } | |
| 2697 | - | var templ_7745c5c3_Var126 string | |
| 2698 | - | templ_7745c5c3_Var126, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) | |
| 2813 | + | var templ_7745c5c3_Var134 string | |
| 2814 | + | templ_7745c5c3_Var134, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) | |
| 2699 | 2815 | if templ_7745c5c3_Err != nil { | |
| 2700 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 535, Col: 102} | |
| 2816 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 549, Col: 102} | |
| 2701 | 2817 | } | |
| 2702 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var126)) | |
| 2818 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var134)) | |
| 2703 | 2819 | if templ_7745c5c3_Err != nil { | |
| 2704 | 2820 | return templ_7745c5c3_Err | |
| 2705 | 2821 | } | |
| 2706 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 255, " after the merge <kbd aria-hidden=\"true\">D</kbd></label>") | |
| 2822 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 265, " after the merge <kbd aria-hidden=\"true\">D</kbd></label>") | |
| 2707 | 2823 | if templ_7745c5c3_Err != nil { | |
| 2708 | 2824 | return templ_7745c5c3_Err | |
| 2709 | 2825 | } | |
| 2710 | 2826 | } | |
| 2711 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 256, "<div class=\"d-btns\"><button type=\"submit\" class=\"btn primary\" data-default") | |
| 2827 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 266, "<div class=\"d-btns\"><button type=\"submit\" class=\"btn primary\" data-default") | |
| 2712 | 2828 | if templ_7745c5c3_Err != nil { | |
| 2713 | 2829 | return templ_7745c5c3_Err | |
| 2714 | 2830 | } | |
| 2715 | 2831 | if !p.Box.CanMerge() { | |
| 2716 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 257, " disabled") | |
| 2832 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 267, " disabled") | |
| 2717 | 2833 | if templ_7745c5c3_Err != nil { | |
| 2718 | 2834 | return templ_7745c5c3_Err | |
| 2719 | 2835 | } | |
| 2720 | 2836 | } | |
| 2721 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 258, " title=\"") | |
| 2837 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 268, " title=\"") | |
| 2722 | 2838 | if templ_7745c5c3_Err != nil { | |
| 2723 | 2839 | return templ_7745c5c3_Err | |
| 2724 | 2840 | } | |
| 2725 | - | var templ_7745c5c3_Var127 string | |
| 2726 | - | templ_7745c5c3_Var127, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.MergeTitle()) | |
| 2841 | + | var templ_7745c5c3_Var135 string | |
| 2842 | + | templ_7745c5c3_Var135, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.MergeTitle()) | |
| 2727 | 2843 | if templ_7745c5c3_Err != nil { | |
| 2728 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 543, Col: 33} | |
| 2844 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 557, Col: 33} | |
| 2729 | 2845 | } | |
| 2730 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var127) | |
| 2846 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var135) | |
| 2731 | 2847 | if templ_7745c5c3_Err != nil { | |
| 2732 | 2848 | return templ_7745c5c3_Err | |
| 2733 | 2849 | } | |
| 2734 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 259, "\" :disabled=\"!this.form.querySelector('input[name=mode]:checked:not(:disabled)')\" :title=\"(this.form.querySelector('input[name=mode]:checked') || {}).title || ''\">Merge into ") | |
| 2850 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 269, "\" :disabled=\"!this.form.querySelector('input[name=mode]:checked:not(:disabled)')\" :title=\"(this.form.querySelector('input[name=mode]:checked') || {}).title || ''\">Merge into ") | |
| 2735 | 2851 | if templ_7745c5c3_Err != nil { | |
| 2736 | 2852 | return templ_7745c5c3_Err | |
| 2737 | 2853 | } | |
| 2738 | - | var templ_7745c5c3_Var128 string | |
| 2739 | - | templ_7745c5c3_Var128, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | |
| 2854 | + | var templ_7745c5c3_Var136 string | |
| 2855 | + | templ_7745c5c3_Var136, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | |
| 2740 | 2856 | if templ_7745c5c3_Err != nil { | |
| 2741 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 546, Col: 28} | |
| 2857 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 560, Col: 28} | |
| 2742 | 2858 | } | |
| 2743 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var128)) | |
| 2859 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var136)) | |
| 2744 | 2860 | if templ_7745c5c3_Err != nil { | |
| 2745 | 2861 | return templ_7745c5c3_Err | |
| 2746 | 2862 | } | |
| 2747 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 260, "</button></div></form>") | |
| 2863 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 270, "</button> ") | |
| 2864 | + | if templ_7745c5c3_Err != nil { | |
| 2865 | + | return templ_7745c5c3_Err | |
| 2866 | + | } | |
| 2867 | + | if p.Box.CanAutoMerge { | |
| 2868 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 271, "<button type=\"submit\" class=\"btn\" formaction=\"") | |
| 2869 | + | if templ_7745c5c3_Err != nil { | |
| 2870 | + | return templ_7745c5c3_Err | |
| 2871 | + | } | |
| 2872 | + | var templ_7745c5c3_Var137 string | |
| 2873 | + | templ_7745c5c3_Var137, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.SafeURL(p.Box.AutoAction)) | |
| 2874 | + | if templ_7745c5c3_Err != nil { | |
| 2875 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 565, Col: 52} | |
| 2876 | + | } | |
| 2877 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var137) | |
| 2878 | + | if templ_7745c5c3_Err != nil { | |
| 2879 | + | return templ_7745c5c3_Err | |
| 2880 | + | } | |
| 2881 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 272, "\"") | |
| 2882 | + | if templ_7745c5c3_Err != nil { | |
| 2883 | + | return templ_7745c5c3_Err | |
| 2884 | + | } | |
| 2885 | + | if len(p.Box.Modes) == 0 { | |
| 2886 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 273, " disabled") | |
| 2887 | + | if templ_7745c5c3_Err != nil { | |
| 2888 | + | return templ_7745c5c3_Err | |
| 2889 | + | } | |
| 2890 | + | } | |
| 2891 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 274, " title=\"merge once the checks pass\">Merge when ready</button>") | |
| 2892 | + | if templ_7745c5c3_Err != nil { | |
| 2893 | + | return templ_7745c5c3_Err | |
| 2894 | + | } | |
| 2895 | + | } | |
| 2896 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 275, "</div></form>") | |
| 2748 | 2897 | if templ_7745c5c3_Err != nil { | |
| 2749 | 2898 | return templ_7745c5c3_Err | |
| 2750 | 2899 | } | |
| 2751 | 2900 | } | |
| 2752 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 261, "</div></details>") | |
| 2901 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, "</div></details>") | |
| 2753 | 2902 | if templ_7745c5c3_Err != nil { | |
| 2754 | 2903 | return templ_7745c5c3_Err | |
| 2755 | 2904 | } | |
| @@ -2775,182 +2924,182 @@ func MRMergeability(v MergeabilityView) templ.Component { | |||
| 2775 | 2924 | }() | |
| 2776 | 2925 | } | |
| 2777 | 2926 | ctx = templ.InitializeContext(ctx) | |
| 2778 | - | templ_7745c5c3_Var129 := templ.GetChildren(ctx) | |
| 2779 | - | if templ_7745c5c3_Var129 == nil { | |
| 2780 | - | templ_7745c5c3_Var129 = templ.NopComponent | |
| 2927 | + | templ_7745c5c3_Var138 := templ.GetChildren(ctx) | |
| 2928 | + | if templ_7745c5c3_Var138 == nil { | |
| 2929 | + | templ_7745c5c3_Var138 = templ.NopComponent | |
| 2781 | 2930 | } | |
| 2782 | 2931 | ctx = templ.ClearChildren(ctx) | |
| 2783 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 262, "<span data-mergeability data-state=\"") | |
| 2932 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 277, "<span data-mergeability data-state=\"") | |
| 2784 | 2933 | if templ_7745c5c3_Err != nil { | |
| 2785 | 2934 | return templ_7745c5c3_Err | |
| 2786 | 2935 | } | |
| 2787 | - | var templ_7745c5c3_Var130 string | |
| 2788 | - | templ_7745c5c3_Var130, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.State) | |
| 2936 | + | var templ_7745c5c3_Var139 string | |
| 2937 | + | templ_7745c5c3_Var139, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.State) | |
| 2789 | 2938 | if templ_7745c5c3_Err != nil { | |
| 2790 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 559, Col: 22} | |
| 2939 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 582, Col: 22} | |
| 2791 | 2940 | } | |
| 2792 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var130) | |
| 2941 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var139) | |
| 2793 | 2942 | if templ_7745c5c3_Err != nil { | |
| 2794 | 2943 | return templ_7745c5c3_Err | |
| 2795 | 2944 | } | |
| 2796 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 263, "\" data-ff-ok=\"") | |
| 2945 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "\" data-ff-ok=\"") | |
| 2797 | 2946 | if templ_7745c5c3_Err != nil { | |
| 2798 | 2947 | return templ_7745c5c3_Err | |
| 2799 | 2948 | } | |
| 2800 | - | var templ_7745c5c3_Var131 string | |
| 2801 | - | templ_7745c5c3_Var131, templ_7745c5c3_Err = templ.ResolveAttributeValue(strconv.FormatBool(v.FFOk)) | |
| 2949 | + | var templ_7745c5c3_Var140 string | |
| 2950 | + | templ_7745c5c3_Var140, templ_7745c5c3_Err = templ.ResolveAttributeValue(strconv.FormatBool(v.FFOk)) | |
| 2802 | 2951 | if templ_7745c5c3_Err != nil { | |
| 2803 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 560, Col: 41} | |
| 2952 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 583, Col: 41} | |
| 2804 | 2953 | } | |
| 2805 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var131) | |
| 2954 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var140) | |
| 2806 | 2955 | if templ_7745c5c3_Err != nil { | |
| 2807 | 2956 | return templ_7745c5c3_Err | |
| 2808 | 2957 | } | |
| 2809 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 264, "\" data-merge-ok=\"") | |
| 2958 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 279, "\" data-merge-ok=\"") | |
| 2810 | 2959 | if templ_7745c5c3_Err != nil { | |
| 2811 | 2960 | return templ_7745c5c3_Err | |
| 2812 | 2961 | } | |
| 2813 | - | var templ_7745c5c3_Var132 string | |
| 2814 | - | templ_7745c5c3_Var132, templ_7745c5c3_Err = templ.ResolveAttributeValue(strconv.FormatBool(v.MergeOk)) | |
| 2962 | + | var templ_7745c5c3_Var141 string | |
| 2963 | + | templ_7745c5c3_Var141, templ_7745c5c3_Err = templ.ResolveAttributeValue(strconv.FormatBool(v.MergeOk)) | |
| 2815 | 2964 | if templ_7745c5c3_Err != nil { | |
| 2816 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 561, Col: 47} | |
| 2965 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 584, Col: 47} | |
| 2817 | 2966 | } | |
| 2818 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var132) | |
| 2967 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var141) | |
| 2819 | 2968 | if templ_7745c5c3_Err != nil { | |
| 2820 | 2969 | return templ_7745c5c3_Err | |
| 2821 | 2970 | } | |
| 2822 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 265, "\" data-ff-reason=\"") | |
| 2971 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 280, "\" data-ff-reason=\"") | |
| 2823 | 2972 | if templ_7745c5c3_Err != nil { | |
| 2824 | 2973 | return templ_7745c5c3_Err | |
| 2825 | 2974 | } | |
| 2826 | - | var templ_7745c5c3_Var133 string | |
| 2827 | - | templ_7745c5c3_Var133, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.FFReason) | |
| 2975 | + | var templ_7745c5c3_Var142 string | |
| 2976 | + | templ_7745c5c3_Var142, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.FFReason) | |
| 2828 | 2977 | if templ_7745c5c3_Err != nil { | |
| 2829 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 562, Col: 29} | |
| 2978 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 585, Col: 29} | |
| 2830 | 2979 | } | |
| 2831 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var133) | |
| 2980 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var142) | |
| 2832 | 2981 | if templ_7745c5c3_Err != nil { | |
| 2833 | 2982 | return templ_7745c5c3_Err | |
| 2834 | 2983 | } | |
| 2835 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 266, "\" data-merge-reason=\"") | |
| 2984 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 281, "\" data-merge-reason=\"") | |
| 2836 | 2985 | if templ_7745c5c3_Err != nil { | |
| 2837 | 2986 | return templ_7745c5c3_Err | |
| 2838 | 2987 | } | |
| 2839 | - | var templ_7745c5c3_Var134 string | |
| 2840 | - | templ_7745c5c3_Var134, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.MergeReason) | |
| 2988 | + | var templ_7745c5c3_Var143 string | |
| 2989 | + | templ_7745c5c3_Var143, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.MergeReason) | |
| 2841 | 2990 | if templ_7745c5c3_Err != nil { | |
| 2842 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 563, Col: 35} | |
| 2991 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 586, Col: 35} | |
| 2843 | 2992 | } | |
| 2844 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var134) | |
| 2993 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var143) | |
| 2845 | 2994 | if templ_7745c5c3_Err != nil { | |
| 2846 | 2995 | return templ_7745c5c3_Err | |
| 2847 | 2996 | } | |
| 2848 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 267, "\"><span class=\"badge\" data-state=\"") | |
| 2997 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 282, "\"><span class=\"badge\" data-state=\"") | |
| 2849 | 2998 | if templ_7745c5c3_Err != nil { | |
| 2850 | 2999 | return templ_7745c5c3_Err | |
| 2851 | 3000 | } | |
| 2852 | - | var templ_7745c5c3_Var135 string | |
| 2853 | - | templ_7745c5c3_Var135, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.State) | |
| 3001 | + | var templ_7745c5c3_Var144 string | |
| 3002 | + | templ_7745c5c3_Var144, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.State) | |
| 2854 | 3003 | if templ_7745c5c3_Err != nil { | |
| 2855 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 565, Col: 42} | |
| 3004 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 588, Col: 42} | |
| 2856 | 3005 | } | |
| 2857 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var135) | |
| 3006 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var144) | |
| 2858 | 3007 | if templ_7745c5c3_Err != nil { | |
| 2859 | 3008 | return templ_7745c5c3_Err | |
| 2860 | 3009 | } | |
| 2861 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 268, "\">") | |
| 3010 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 283, "\">") | |
| 2862 | 3011 | if templ_7745c5c3_Err != nil { | |
| 2863 | 3012 | return templ_7745c5c3_Err | |
| 2864 | 3013 | } | |
| 2865 | - | var templ_7745c5c3_Var136 string | |
| 2866 | - | templ_7745c5c3_Var136, templ_7745c5c3_Err = templ.JoinStringErrs(v.Label) | |
| 3014 | + | var templ_7745c5c3_Var145 string | |
| 3015 | + | templ_7745c5c3_Var145, templ_7745c5c3_Err = templ.JoinStringErrs(v.Label) | |
| 2867 | 3016 | if templ_7745c5c3_Err != nil { | |
| 2868 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 565, Col: 54} | |
| 3017 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 588, Col: 54} | |
| 2869 | 3018 | } | |
| 2870 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var136)) | |
| 3019 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var145)) | |
| 2871 | 3020 | if templ_7745c5c3_Err != nil { | |
| 2872 | 3021 | return templ_7745c5c3_Err | |
| 2873 | 3022 | } | |
| 2874 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 269, "</span> ") | |
| 3023 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 284, "</span> ") | |
| 2875 | 3024 | if templ_7745c5c3_Err != nil { | |
| 2876 | 3025 | return templ_7745c5c3_Err | |
| 2877 | 3026 | } | |
| 2878 | 3027 | if v.Detail != "" { | |
| 2879 | - | var templ_7745c5c3_Var137 string | |
| 2880 | - | templ_7745c5c3_Var137, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |
| 3028 | + | var templ_7745c5c3_Var146 string | |
| 3029 | + | templ_7745c5c3_Var146, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |
| 2881 | 3030 | if templ_7745c5c3_Err != nil { | |
| 2882 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 567, Col: 8} | |
| 3031 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 590, Col: 8} | |
| 2883 | 3032 | } | |
| 2884 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var137)) | |
| 3033 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var146)) | |
| 2885 | 3034 | if templ_7745c5c3_Err != nil { | |
| 2886 | 3035 | return templ_7745c5c3_Err | |
| 2887 | 3036 | } | |
| 2888 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 270, "<span class=\"dim\">") | |
| 3037 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 285, "<span class=\"dim\">") | |
| 2889 | 3038 | if templ_7745c5c3_Err != nil { | |
| 2890 | 3039 | return templ_7745c5c3_Err | |
| 2891 | 3040 | } | |
| 2892 | - | var templ_7745c5c3_Var138 string | |
| 2893 | - | templ_7745c5c3_Var138, templ_7745c5c3_Err = templ.JoinStringErrs(v.Detail) | |
| 3041 | + | var templ_7745c5c3_Var147 string | |
| 3042 | + | templ_7745c5c3_Var147, templ_7745c5c3_Err = templ.JoinStringErrs(v.Detail) | |
| 2894 | 3043 | if templ_7745c5c3_Err != nil { | |
| 2895 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 567, Col: 38} | |
| 3044 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 590, Col: 38} | |
| 2896 | 3045 | } | |
| 2897 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var138)) | |
| 3046 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var147)) | |
| 2898 | 3047 | if templ_7745c5c3_Err != nil { | |
| 2899 | 3048 | return templ_7745c5c3_Err | |
| 2900 | 3049 | } | |
| 2901 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 271, "</span>") | |
| 3050 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 286, "</span>") | |
| 2902 | 3051 | if templ_7745c5c3_Err != nil { | |
| 2903 | 3052 | return templ_7745c5c3_Err | |
| 2904 | 3053 | } | |
| 2905 | 3054 | } | |
| 2906 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 272, "</span> ") | |
| 3055 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 287, "</span> ") | |
| 2907 | 3056 | if templ_7745c5c3_Err != nil { | |
| 2908 | 3057 | return templ_7745c5c3_Err | |
| 2909 | 3058 | } | |
| 2910 | 3059 | if len(v.Paths) > 0 { | |
| 2911 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 273, "<ul class=\"mg-paths\" aria-label=\"conflicting files\">") | |
| 3060 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 288, "<ul class=\"mg-paths\" aria-label=\"conflicting files\">") | |
| 2912 | 3061 | if templ_7745c5c3_Err != nil { | |
| 2913 | 3062 | return templ_7745c5c3_Err | |
| 2914 | 3063 | } | |
| 2915 | 3064 | for _, path := range v.Paths { | |
| 2916 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 274, "<li><code>") | |
| 3065 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 289, "<li><code>") | |
| 2917 | 3066 | if templ_7745c5c3_Err != nil { | |
| 2918 | 3067 | return templ_7745c5c3_Err | |
| 2919 | 3068 | } | |
| 2920 | - | var templ_7745c5c3_Var139 string | |
| 2921 | - | templ_7745c5c3_Var139, templ_7745c5c3_Err = templ.JoinStringErrs(path) | |
| 3069 | + | var templ_7745c5c3_Var148 string | |
| 3070 | + | templ_7745c5c3_Var148, templ_7745c5c3_Err = templ.JoinStringErrs(path) | |
| 2922 | 3071 | if templ_7745c5c3_Err != nil { | |
| 2923 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 573, Col: 20} | |
| 3072 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 596, Col: 20} | |
| 2924 | 3073 | } | |
| 2925 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var139)) | |
| 3074 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var148)) | |
| 2926 | 3075 | if templ_7745c5c3_Err != nil { | |
| 2927 | 3076 | return templ_7745c5c3_Err | |
| 2928 | 3077 | } | |
| 2929 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 275, "</code></li>") | |
| 3078 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 290, "</code></li>") | |
| 2930 | 3079 | if templ_7745c5c3_Err != nil { | |
| 2931 | 3080 | return templ_7745c5c3_Err | |
| 2932 | 3081 | } | |
| 2933 | 3082 | } | |
| 2934 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, "</ul>") | |
| 3083 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 291, "</ul>") | |
| 2935 | 3084 | if templ_7745c5c3_Err != nil { | |
| 2936 | 3085 | return templ_7745c5c3_Err | |
| 2937 | 3086 | } | |
| 2938 | 3087 | } | |
| 2939 | 3088 | if v.PathsNote != "" { | |
| 2940 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 277, "<p class=\"dim\">") | |
| 3089 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 292, "<p class=\"dim\">") | |
| 2941 | 3090 | if templ_7745c5c3_Err != nil { | |
| 2942 | 3091 | return templ_7745c5c3_Err | |
| 2943 | 3092 | } | |
| 2944 | - | var templ_7745c5c3_Var140 string | |
| 2945 | - | templ_7745c5c3_Var140, templ_7745c5c3_Err = templ.JoinStringErrs(v.PathsNote) | |
| 3093 | + | var templ_7745c5c3_Var149 string | |
| 3094 | + | templ_7745c5c3_Var149, templ_7745c5c3_Err = templ.JoinStringErrs(v.PathsNote) | |
| 2946 | 3095 | if templ_7745c5c3_Err != nil { | |
| 2947 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 578, Col: 30} | |
| 3096 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 601, Col: 30} | |
| 2948 | 3097 | } | |
| 2949 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var140)) | |
| 3098 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var149)) | |
| 2950 | 3099 | if templ_7745c5c3_Err != nil { | |
| 2951 | 3100 | return templ_7745c5c3_Err | |
| 2952 | 3101 | } | |
| 2953 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "</p>") | |
| 3102 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 293, "</p>") | |
| 2954 | 3103 | if templ_7745c5c3_Err != nil { | |
| 2955 | 3104 | return templ_7745c5c3_Err | |
| 2956 | 3105 | } | |
| @@ -2977,12 +3126,12 @@ func mrMergeabilitySlot(v MergeabilityView) templ.Component { | |||
| 2977 | 3126 | }() | |
| 2978 | 3127 | } | |
| 2979 | 3128 | ctx = templ.InitializeContext(ctx) | |
| 2980 | - | templ_7745c5c3_Var141 := templ.GetChildren(ctx) | |
| 2981 | - | if templ_7745c5c3_Var141 == nil { | |
| 2982 | - | templ_7745c5c3_Var141 = templ.NopComponent | |
| 3129 | + | templ_7745c5c3_Var150 := templ.GetChildren(ctx) | |
| 3130 | + | if templ_7745c5c3_Var150 == nil { | |
| 3131 | + | templ_7745c5c3_Var150 = templ.NopComponent | |
| 2983 | 3132 | } | |
| 2984 | 3133 | ctx = templ.ClearChildren(ctx) | |
| 2985 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 279, "<div id=\"mr-mergeability\" class=\"live-slot\" role=\"status\" data-slot>") | |
| 3134 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 294, "<div id=\"mr-mergeability\" class=\"live-slot\" role=\"status\" data-slot>") | |
| 2986 | 3135 | if templ_7745c5c3_Err != nil { | |
| 2987 | 3136 | return templ_7745c5c3_Err | |
| 2988 | 3137 | } | |
| @@ -2990,7 +3139,7 @@ func mrMergeabilitySlot(v MergeabilityView) templ.Component { | |||
| 2990 | 3139 | if templ_7745c5c3_Err != nil { | |
| 2991 | 3140 | return templ_7745c5c3_Err | |
| 2992 | 3141 | } | |
| 2993 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 280, "</div>") | |
| 3142 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 295, "</div>") | |
| 2994 | 3143 | if templ_7745c5c3_Err != nil { | |
| 2995 | 3144 | return templ_7745c5c3_Err | |
| 2996 | 3145 | } | |
| @@ -3015,9 +3164,9 @@ func MRMergeabilityFragment(v MergeabilityView) templ.Component { | |||
| 3015 | 3164 | }() | |
| 3016 | 3165 | } | |
| 3017 | 3166 | ctx = templ.InitializeContext(ctx) | |
| 3018 | - | templ_7745c5c3_Var142 := templ.GetChildren(ctx) | |
| 3019 | - | if templ_7745c5c3_Var142 == nil { | |
| 3020 | - | templ_7745c5c3_Var142 = templ.NopComponent | |
| 3167 | + | templ_7745c5c3_Var151 := templ.GetChildren(ctx) | |
| 3168 | + | if templ_7745c5c3_Var151 == nil { | |
| 3169 | + | templ_7745c5c3_Var151 = templ.NopComponent | |
| 3021 | 3170 | } | |
| 3022 | 3171 | ctx = templ.ClearChildren(ctx) | |
| 3023 | 3172 | templ_7745c5c3_Err = mrMergeabilitySlot(v).Render(ctx, templ_7745c5c3_Buffer) | |
| @@ -3046,128 +3195,128 @@ func moreMenu(p MRPage) templ.Component { | |||
| 3046 | 3195 | }() | |
| 3047 | 3196 | } | |
| 3048 | 3197 | ctx = templ.InitializeContext(ctx) | |
| 3049 | - | templ_7745c5c3_Var143 := templ.GetChildren(ctx) | |
| 3050 | - | if templ_7745c5c3_Var143 == nil { | |
| 3051 | - | templ_7745c5c3_Var143 = templ.NopComponent | |
| 3198 | + | templ_7745c5c3_Var152 := templ.GetChildren(ctx) | |
| 3199 | + | if templ_7745c5c3_Var152 == nil { | |
| 3200 | + | templ_7745c5c3_Var152 = templ.NopComponent | |
| 3052 | 3201 | } | |
| 3053 | 3202 | ctx = templ.ClearChildren(ctx) | |
| 3054 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 281, "<details class=\"menu omenu\"><summary class=\"btn icon\" aria-label=\"More actions\" title=\"more actions\">⋯</summary><div class=\"menu-pop\" role=\"group\" aria-label=\"More actions\"><section class=\"merge-settings\"><h2>Merge settings</h2><dl class=\"kv\"><dt>modes</dt><dd>") | |
| 3203 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 296, "<details class=\"menu omenu\"><summary class=\"btn icon\" aria-label=\"More actions\" title=\"more actions\">⋯</summary><div class=\"menu-pop\" role=\"group\" aria-label=\"More actions\"><section class=\"merge-settings\"><h2>Merge settings</h2><dl class=\"kv\"><dt>modes</dt><dd>") | |
| 3055 | 3204 | if templ_7745c5c3_Err != nil { | |
| 3056 | 3205 | return templ_7745c5c3_Err | |
| 3057 | 3206 | } | |
| 3058 | - | var templ_7745c5c3_Var144 string | |
| 3059 | - | templ_7745c5c3_Var144, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(p.Modes, ", ")) | |
| 3207 | + | var templ_7745c5c3_Var153 string | |
| 3208 | + | templ_7745c5c3_Var153, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(p.Modes, ", ")) | |
| 3060 | 3209 | if templ_7745c5c3_Err != nil { | |
| 3061 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 605, Col: 38} | |
| 3210 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 628, Col: 38} | |
| 3062 | 3211 | } | |
| 3063 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var144)) | |
| 3212 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var153)) | |
| 3064 | 3213 | if templ_7745c5c3_Err != nil { | |
| 3065 | 3214 | return templ_7745c5c3_Err | |
| 3066 | 3215 | } | |
| 3067 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 282, "</dd><dt>checks</dt><dd>") | |
| 3216 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 297, "</dd><dt>checks</dt><dd>") | |
| 3068 | 3217 | if templ_7745c5c3_Err != nil { | |
| 3069 | 3218 | return templ_7745c5c3_Err | |
| 3070 | 3219 | } | |
| 3071 | 3220 | if p.ChecksBlock { | |
| 3072 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 283, "failing ones block the merge") | |
| 3221 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 298, "failing ones block the merge") | |
| 3073 | 3222 | if templ_7745c5c3_Err != nil { | |
| 3074 | 3223 | return templ_7745c5c3_Err | |
| 3075 | 3224 | } | |
| 3076 | 3225 | } else { | |
| 3077 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 284, "do not block the merge") | |
| 3226 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 299, "do not block the merge") | |
| 3078 | 3227 | if templ_7745c5c3_Err != nil { | |
| 3079 | 3228 | return templ_7745c5c3_Err | |
| 3080 | 3229 | } | |
| 3081 | 3230 | } | |
| 3082 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 285, "</dd></dl></section>") | |
| 3231 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 300, "</dd></dl></section>") | |
| 3083 | 3232 | if templ_7745c5c3_Err != nil { | |
| 3084 | 3233 | return templ_7745c5c3_Err | |
| 3085 | 3234 | } | |
| 3086 | 3235 | if p.Box != nil { | |
| 3087 | 3236 | if p.Box.Signed { | |
| 3088 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 286, "<p class=\"d-note\" id=\"mr-signing\">squash and merge commits are signed with ermite's own key (generated on first start). ") | |
| 3237 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 301, "<p class=\"d-note\" id=\"mr-signing\">squash and merge commits are signed with ermite's own key (generated on first start). ") | |
| 3089 | 3238 | if templ_7745c5c3_Err != nil { | |
| 3090 | 3239 | return templ_7745c5c3_Err | |
| 3091 | 3240 | } | |
| 3092 | 3241 | if p.Box.Fingerprint != "" { | |
| 3093 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 287, "fingerprint <code>") | |
| 3242 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 302, "fingerprint <code>") | |
| 3094 | 3243 | if templ_7745c5c3_Err != nil { | |
| 3095 | 3244 | return templ_7745c5c3_Err | |
| 3096 | 3245 | } | |
| 3097 | - | var templ_7745c5c3_Var145 string | |
| 3098 | - | templ_7745c5c3_Var145, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.Fingerprint) | |
| 3246 | + | var templ_7745c5c3_Var154 string | |
| 3247 | + | templ_7745c5c3_Var154, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.Fingerprint) | |
| 3099 | 3248 | if templ_7745c5c3_Err != nil { | |
| 3100 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 621, Col: 44} | |
| 3249 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 644, Col: 44} | |
| 3101 | 3250 | } | |
| 3102 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var145)) | |
| 3251 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var154)) | |
| 3103 | 3252 | if templ_7745c5c3_Err != nil { | |
| 3104 | 3253 | return templ_7745c5c3_Err | |
| 3105 | 3254 | } | |
| 3106 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 288, "</code> ") | |
| 3255 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 303, "</code> ") | |
| 3107 | 3256 | if templ_7745c5c3_Err != nil { | |
| 3108 | 3257 | return templ_7745c5c3_Err | |
| 3109 | 3258 | } | |
| 3110 | 3259 | } | |
| 3111 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 289, "<code>ermite signing-key show</code> prints it.</p>") | |
| 3260 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 304, "<code>ermite signing-key show</code> prints it.</p>") | |
| 3112 | 3261 | if templ_7745c5c3_Err != nil { | |
| 3113 | 3262 | return templ_7745c5c3_Err | |
| 3114 | 3263 | } | |
| 3115 | 3264 | } | |
| 3116 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 290, " ") | |
| 3265 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 305, " ") | |
| 3117 | 3266 | if templ_7745c5c3_Err != nil { | |
| 3118 | 3267 | return templ_7745c5c3_Err | |
| 3119 | 3268 | } | |
| 3120 | 3269 | if p.Box.CanMarkRead { | |
| 3121 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 291, "<form method=\"post\" action=\"") | |
| 3270 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 306, "<form method=\"post\" action=\"") | |
| 3122 | 3271 | if templ_7745c5c3_Err != nil { | |
| 3123 | 3272 | return templ_7745c5c3_Err | |
| 3124 | 3273 | } | |
| 3125 | - | var templ_7745c5c3_Var146 templ.SafeURL | |
| 3126 | - | templ_7745c5c3_Var146, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.ReadAction)) | |
| 3274 | + | var templ_7745c5c3_Var155 templ.SafeURL | |
| 3275 | + | templ_7745c5c3_Var155, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.ReadAction)) | |
| 3127 | 3276 | if templ_7745c5c3_Err != nil { | |
| 3128 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 627, Col: 65} | |
| 3277 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 650, Col: 65} | |
| 3129 | 3278 | } | |
| 3130 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var146)) | |
| 3279 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var155)) | |
| 3131 | 3280 | if templ_7745c5c3_Err != nil { | |
| 3132 | 3281 | return templ_7745c5c3_Err | |
| 3133 | 3282 | } | |
| 3134 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 292, "\"><input type=\"hidden\" name=\"head_id\" value=\"") | |
| 3283 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 307, "\"><input type=\"hidden\" name=\"head_id\" value=\"") | |
| 3135 | 3284 | if templ_7745c5c3_Err != nil { | |
| 3136 | 3285 | return templ_7745c5c3_Err | |
| 3137 | 3286 | } | |
| 3138 | - | var templ_7745c5c3_Var147 string | |
| 3139 | - | templ_7745c5c3_Var147, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.Head) | |
| 3287 | + | var templ_7745c5c3_Var156 string | |
| 3288 | + | templ_7745c5c3_Var156, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.Head) | |
| 3140 | 3289 | if templ_7745c5c3_Err != nil { | |
| 3141 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 628, Col: 60} | |
| 3290 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 651, Col: 60} | |
| 3142 | 3291 | } | |
| 3143 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var147) | |
| 3292 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var156) | |
| 3144 | 3293 | if templ_7745c5c3_Err != nil { | |
| 3145 | 3294 | return templ_7745c5c3_Err | |
| 3146 | 3295 | } | |
| 3147 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 293, "\"> <button type=\"submit\" title=\"the next visit can show only what changed after this head\" class=\"btn\" aria-keyshortcuts=\"Shift+R\" data-read>Mark read <kbd aria-hidden=\"true\">R</kbd></button></form>") | |
| 3296 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 308, "\"> <button type=\"submit\" title=\"the next visit can show only what changed after this head\" class=\"btn\" aria-keyshortcuts=\"Shift+R\" data-read>Mark read <kbd aria-hidden=\"true\">R</kbd></button></form>") | |
| 3148 | 3297 | if templ_7745c5c3_Err != nil { | |
| 3149 | 3298 | return templ_7745c5c3_Err | |
| 3150 | 3299 | } | |
| 3151 | 3300 | } | |
| 3152 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 294, " <form method=\"post\" action=\"") | |
| 3301 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 309, " <form method=\"post\" action=\"") | |
| 3153 | 3302 | if templ_7745c5c3_Err != nil { | |
| 3154 | 3303 | return templ_7745c5c3_Err | |
| 3155 | 3304 | } | |
| 3156 | - | var templ_7745c5c3_Var148 templ.SafeURL | |
| 3157 | - | templ_7745c5c3_Var148, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.CloseAction)) | |
| 3305 | + | var templ_7745c5c3_Var157 templ.SafeURL | |
| 3306 | + | templ_7745c5c3_Var157, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.CloseAction)) | |
| 3158 | 3307 | if templ_7745c5c3_Err != nil { | |
| 3159 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 632, Col: 65} | |
| 3308 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 655, Col: 65} | |
| 3160 | 3309 | } | |
| 3161 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var148)) | |
| 3310 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var157)) | |
| 3162 | 3311 | if templ_7745c5c3_Err != nil { | |
| 3163 | 3312 | return templ_7745c5c3_Err | |
| 3164 | 3313 | } | |
| 3165 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 295, "\"><button type=\"submit\" title=\"close without merging; the branch is kept\" class=\"btn danger\">Close</button></form>") | |
| 3314 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 310, "\"><button type=\"submit\" title=\"close without merging; the branch is kept\" class=\"btn danger\">Close</button></form>") | |
| 3166 | 3315 | if templ_7745c5c3_Err != nil { | |
| 3167 | 3316 | return templ_7745c5c3_Err | |
| 3168 | 3317 | } | |
| 3169 | 3318 | if !p.Box.HeadGone && p.Box.ReadyAction == "" { | |
| 3170 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 296, "<details class=\"d-or\"><summary class=\"mute\">or from a terminal</summary>") | |
| 3319 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 311, "<details class=\"d-or\"><summary class=\"mute\">or from a terminal</summary>") | |
| 3171 | 3320 | if templ_7745c5c3_Err != nil { | |
| 3172 | 3321 | return templ_7745c5c3_Err | |
| 3173 | 3322 | } | |
| @@ -3175,13 +3324,13 @@ func moreMenu(p MRPage) templ.Component { | |||
| 3175 | 3324 | if templ_7745c5c3_Err != nil { | |
| 3176 | 3325 | return templ_7745c5c3_Err | |
| 3177 | 3326 | } | |
| 3178 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 297, "</details>") | |
| 3327 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 312, "</details>") | |
| 3179 | 3328 | if templ_7745c5c3_Err != nil { | |
| 3180 | 3329 | return templ_7745c5c3_Err | |
| 3181 | 3330 | } | |
| 3182 | 3331 | } | |
| 3183 | 3332 | } | |
| 3184 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 298, "</div></details>") | |
| 3333 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 313, "</div></details>") | |
| 3185 | 3334 | if templ_7745c5c3_Err != nil { | |
| 3186 | 3335 | return templ_7745c5c3_Err | |
| 3187 | 3336 | } | |
| @@ -3205,12 +3354,12 @@ func Compare(l Layout, p ComparePage) templ.Component { | |||
| 3205 | 3354 | }() | |
| 3206 | 3355 | } | |
| 3207 | 3356 | ctx = templ.InitializeContext(ctx) | |
| 3208 | - | templ_7745c5c3_Var149 := templ.GetChildren(ctx) | |
| 3209 | - | if templ_7745c5c3_Var149 == nil { | |
| 3210 | - | templ_7745c5c3_Var149 = templ.NopComponent | |
| 3357 | + | templ_7745c5c3_Var158 := templ.GetChildren(ctx) | |
| 3358 | + | if templ_7745c5c3_Var158 == nil { | |
| 3359 | + | templ_7745c5c3_Var158 = templ.NopComponent | |
| 3211 | 3360 | } | |
| 3212 | 3361 | ctx = templ.ClearChildren(ctx) | |
| 3213 | - | templ_7745c5c3_Var150 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | |
| 3362 | + | templ_7745c5c3_Var159 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | |
| 3214 | 3363 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | |
| 3215 | 3364 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | |
| 3216 | 3365 | if !templ_7745c5c3_IsBuffer { | |
| @@ -3222,263 +3371,263 @@ func Compare(l Layout, p ComparePage) templ.Component { | |||
| 3222 | 3371 | }() | |
| 3223 | 3372 | } | |
| 3224 | 3373 | ctx = templ.InitializeContext(ctx) | |
| 3225 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 299, "<header class=\"show mr-h\"><h1>") | |
| 3374 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 314, "<header class=\"show mr-h\"><h1>") | |
| 3226 | 3375 | if templ_7745c5c3_Err != nil { | |
| 3227 | 3376 | return templ_7745c5c3_Err | |
| 3228 | 3377 | } | |
| 3229 | - | var templ_7745c5c3_Var151 string | |
| 3230 | - | templ_7745c5c3_Var151, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) | |
| 3378 | + | var templ_7745c5c3_Var160 string | |
| 3379 | + | templ_7745c5c3_Var160, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) | |
| 3231 | 3380 | if templ_7745c5c3_Err != nil { | |
| 3232 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 649, Col: 17} | |
| 3381 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 672, Col: 17} | |
| 3233 | 3382 | } | |
| 3234 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var151)) | |
| 3383 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var160)) | |
| 3235 | 3384 | if templ_7745c5c3_Err != nil { | |
| 3236 | 3385 | return templ_7745c5c3_Err | |
| 3237 | 3386 | } | |
| 3238 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 300, " → ") | |
| 3387 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 315, " → ") | |
| 3239 | 3388 | if templ_7745c5c3_Err != nil { | |
| 3240 | 3389 | return templ_7745c5c3_Err | |
| 3241 | 3390 | } | |
| 3242 | - | var templ_7745c5c3_Var152 string | |
| 3243 | - | templ_7745c5c3_Var152, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | |
| 3391 | + | var templ_7745c5c3_Var161 string | |
| 3392 | + | templ_7745c5c3_Var161, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | |
| 3244 | 3393 | if templ_7745c5c3_Err != nil { | |
| 3245 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 649, Col: 34} | |
| 3394 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 672, Col: 34} | |
| 3246 | 3395 | } | |
| 3247 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var152)) | |
| 3396 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var161)) | |
| 3248 | 3397 | if templ_7745c5c3_Err != nil { | |
| 3249 | 3398 | return templ_7745c5c3_Err | |
| 3250 | 3399 | } | |
| 3251 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 301, "</h1><dl class=\"kv show-kv\"><dt>branch</dt><dd><a href=\"") | |
| 3400 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 316, "</h1><dl class=\"kv show-kv\"><dt>branch</dt><dd><a href=\"") | |
| 3252 | 3401 | if templ_7745c5c3_Err != nil { | |
| 3253 | 3402 | return templ_7745c5c3_Err | |
| 3254 | 3403 | } | |
| 3255 | - | var templ_7745c5c3_Var153 templ.SafeURL | |
| 3256 | - | templ_7745c5c3_Var153, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.SourceHref)) | |
| 3404 | + | var templ_7745c5c3_Var162 templ.SafeURL | |
| 3405 | + | templ_7745c5c3_Var162, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.SourceHref)) | |
| 3257 | 3406 | if templ_7745c5c3_Err != nil { | |
| 3258 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 652, Col: 45} | |
| 3407 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 675, Col: 45} | |
| 3259 | 3408 | } | |
| 3260 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var153)) | |
| 3409 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var162)) | |
| 3261 | 3410 | if templ_7745c5c3_Err != nil { | |
| 3262 | 3411 | return templ_7745c5c3_Err | |
| 3263 | 3412 | } | |
| 3264 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 302, "\">") | |
| 3413 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 317, "\">") | |
| 3265 | 3414 | if templ_7745c5c3_Err != nil { | |
| 3266 | 3415 | return templ_7745c5c3_Err | |
| 3267 | 3416 | } | |
| 3268 | - | var templ_7745c5c3_Var154 string | |
| 3269 | - | templ_7745c5c3_Var154, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) | |
| 3417 | + | var templ_7745c5c3_Var163 string | |
| 3418 | + | templ_7745c5c3_Var163, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) | |
| 3270 | 3419 | if templ_7745c5c3_Err != nil { | |
| 3271 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 652, Col: 58} | |
| 3420 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 675, Col: 58} | |
| 3272 | 3421 | } | |
| 3273 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var154)) | |
| 3422 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var163)) | |
| 3274 | 3423 | if templ_7745c5c3_Err != nil { | |
| 3275 | 3424 | return templ_7745c5c3_Err | |
| 3276 | 3425 | } | |
| 3277 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 303, "</a></dd><dt>target</dt><dd><a href=\"") | |
| 3426 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 318, "</a></dd><dt>target</dt><dd><a href=\"") | |
| 3278 | 3427 | if templ_7745c5c3_Err != nil { | |
| 3279 | 3428 | return templ_7745c5c3_Err | |
| 3280 | 3429 | } | |
| 3281 | - | var templ_7745c5c3_Var155 templ.SafeURL | |
| 3282 | - | templ_7745c5c3_Var155, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.TargetHref)) | |
| 3430 | + | var templ_7745c5c3_Var164 templ.SafeURL | |
| 3431 | + | templ_7745c5c3_Var164, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.TargetHref)) | |
| 3283 | 3432 | if templ_7745c5c3_Err != nil { | |
| 3284 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 654, Col: 45} | |
| 3433 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 677, Col: 45} | |
| 3285 | 3434 | } | |
| 3286 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var155)) | |
| 3435 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var164)) | |
| 3287 | 3436 | if templ_7745c5c3_Err != nil { | |
| 3288 | 3437 | return templ_7745c5c3_Err | |
| 3289 | 3438 | } | |
| 3290 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 304, "\">") | |
| 3439 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 319, "\">") | |
| 3291 | 3440 | if templ_7745c5c3_Err != nil { | |
| 3292 | 3441 | return templ_7745c5c3_Err | |
| 3293 | 3442 | } | |
| 3294 | - | var templ_7745c5c3_Var156 string | |
| 3295 | - | templ_7745c5c3_Var156, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | |
| 3443 | + | var templ_7745c5c3_Var165 string | |
| 3444 | + | templ_7745c5c3_Var165, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | |
| 3296 | 3445 | if templ_7745c5c3_Err != nil { | |
| 3297 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 654, Col: 58} | |
| 3446 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 677, Col: 58} | |
| 3298 | 3447 | } | |
| 3299 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var156)) | |
| 3448 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var165)) | |
| 3300 | 3449 | if templ_7745c5c3_Err != nil { | |
| 3301 | 3450 | return templ_7745c5c3_Err | |
| 3302 | 3451 | } | |
| 3303 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 305, "</a></dd><dt>ahead</dt><dd>") | |
| 3452 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 320, "</a></dd><dt>ahead</dt><dd>") | |
| 3304 | 3453 | if templ_7745c5c3_Err != nil { | |
| 3305 | 3454 | return templ_7745c5c3_Err | |
| 3306 | 3455 | } | |
| 3307 | - | var templ_7745c5c3_Var157 string | |
| 3308 | - | templ_7745c5c3_Var157, templ_7745c5c3_Err = templ.JoinStringErrs(p.AheadText) | |
| 3456 | + | var templ_7745c5c3_Var166 string | |
| 3457 | + | templ_7745c5c3_Var166, templ_7745c5c3_Err = templ.JoinStringErrs(p.AheadText) | |
| 3309 | 3458 | if templ_7745c5c3_Err != nil { | |
| 3310 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 656, Col: 21} | |
| 3459 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 679, Col: 21} | |
| 3311 | 3460 | } | |
| 3312 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var157)) | |
| 3461 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var166)) | |
| 3313 | 3462 | if templ_7745c5c3_Err != nil { | |
| 3314 | 3463 | return templ_7745c5c3_Err | |
| 3315 | 3464 | } | |
| 3316 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 306, "</dd></dl></header>") | |
| 3465 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 321, "</dd></dl></header>") | |
| 3317 | 3466 | if templ_7745c5c3_Err != nil { | |
| 3318 | 3467 | return templ_7745c5c3_Err | |
| 3319 | 3468 | } | |
| 3320 | 3469 | if p.Note != "" { | |
| 3321 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 307, "<p class=\"notice\">") | |
| 3470 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 322, "<p class=\"notice\">") | |
| 3322 | 3471 | if templ_7745c5c3_Err != nil { | |
| 3323 | 3472 | return templ_7745c5c3_Err | |
| 3324 | 3473 | } | |
| 3325 | - | var templ_7745c5c3_Var158 string | |
| 3326 | - | templ_7745c5c3_Var158, templ_7745c5c3_Err = templ.JoinStringErrs(p.Note) | |
| 3474 | + | var templ_7745c5c3_Var167 string | |
| 3475 | + | templ_7745c5c3_Var167, templ_7745c5c3_Err = templ.JoinStringErrs(p.Note) | |
| 3327 | 3476 | if templ_7745c5c3_Err != nil { | |
| 3328 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 660, Col: 29} | |
| 3477 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 683, Col: 29} | |
| 3329 | 3478 | } | |
| 3330 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var158)) | |
| 3479 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var167)) | |
| 3331 | 3480 | if templ_7745c5c3_Err != nil { | |
| 3332 | 3481 | return templ_7745c5c3_Err | |
| 3333 | 3482 | } | |
| 3334 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 308, "</p>") | |
| 3483 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 323, "</p>") | |
| 3335 | 3484 | if templ_7745c5c3_Err != nil { | |
| 3336 | 3485 | return templ_7745c5c3_Err | |
| 3337 | 3486 | } | |
| 3338 | 3487 | } | |
| 3339 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 309, " ") | |
| 3488 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 324, " ") | |
| 3340 | 3489 | if templ_7745c5c3_Err != nil { | |
| 3341 | 3490 | return templ_7745c5c3_Err | |
| 3342 | 3491 | } | |
| 3343 | 3492 | if p.Existing != nil { | |
| 3344 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 310, "<p class=\"notice\">an open merge request already covers these branches: <a href=\"") | |
| 3493 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 325, "<p class=\"notice\">an open merge request already covers these branches: <a href=\"") | |
| 3345 | 3494 | if templ_7745c5c3_Err != nil { | |
| 3346 | 3495 | return templ_7745c5c3_Err | |
| 3347 | 3496 | } | |
| 3348 | - | var templ_7745c5c3_Var159 templ.SafeURL | |
| 3349 | - | templ_7745c5c3_Var159, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Existing.Href)) | |
| 3497 | + | var templ_7745c5c3_Var168 templ.SafeURL | |
| 3498 | + | templ_7745c5c3_Var168, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Existing.Href)) | |
| 3350 | 3499 | if templ_7745c5c3_Err != nil { | |
| 3351 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 663, Col: 114} | |
| 3500 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 686, Col: 114} | |
| 3352 | 3501 | } | |
| 3353 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var159)) | |
| 3502 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var168)) | |
| 3354 | 3503 | if templ_7745c5c3_Err != nil { | |
| 3355 | 3504 | return templ_7745c5c3_Err | |
| 3356 | 3505 | } | |
| 3357 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 311, "\">") | |
| 3506 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 326, "\">") | |
| 3358 | 3507 | if templ_7745c5c3_Err != nil { | |
| 3359 | 3508 | return templ_7745c5c3_Err | |
| 3360 | 3509 | } | |
| 3361 | - | var templ_7745c5c3_Var160 string | |
| 3362 | - | templ_7745c5c3_Var160, templ_7745c5c3_Err = templ.JoinStringErrs(p.Existing.Label) | |
| 3510 | + | var templ_7745c5c3_Var169 string | |
| 3511 | + | templ_7745c5c3_Var169, templ_7745c5c3_Err = templ.JoinStringErrs(p.Existing.Label) | |
| 3363 | 3512 | if templ_7745c5c3_Err != nil { | |
| 3364 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 663, Col: 135} | |
| 3513 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 686, Col: 135} | |
| 3365 | 3514 | } | |
| 3366 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var160)) | |
| 3515 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var169)) | |
| 3367 | 3516 | if templ_7745c5c3_Err != nil { | |
| 3368 | 3517 | return templ_7745c5c3_Err | |
| 3369 | 3518 | } | |
| 3370 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 312, "</a></p>") | |
| 3519 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 327, "</a></p>") | |
| 3371 | 3520 | if templ_7745c5c3_Err != nil { | |
| 3372 | 3521 | return templ_7745c5c3_Err | |
| 3373 | 3522 | } | |
| 3374 | 3523 | } | |
| 3375 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 313, " ") | |
| 3524 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 328, " ") | |
| 3376 | 3525 | if templ_7745c5c3_Err != nil { | |
| 3377 | 3526 | return templ_7745c5c3_Err | |
| 3378 | 3527 | } | |
| 3379 | 3528 | if p.Create != nil { | |
| 3380 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 314, "<form class=\"cform create\" method=\"post\" action=\"") | |
| 3529 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 329, "<form class=\"cform create\" method=\"post\" action=\"") | |
| 3381 | 3530 | if templ_7745c5c3_Err != nil { | |
| 3382 | 3531 | return templ_7745c5c3_Err | |
| 3383 | 3532 | } | |
| 3384 | - | var templ_7745c5c3_Var161 templ.SafeURL | |
| 3385 | - | templ_7745c5c3_Var161, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Create.Action)) | |
| 3533 | + | var templ_7745c5c3_Var170 templ.SafeURL | |
| 3534 | + | templ_7745c5c3_Var170, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Create.Action)) | |
| 3386 | 3535 | if templ_7745c5c3_Err != nil { | |
| 3387 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 666, Col: 83} | |
| 3536 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 689, Col: 83} | |
| 3388 | 3537 | } | |
| 3389 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var161)) | |
| 3538 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var170)) | |
| 3390 | 3539 | if templ_7745c5c3_Err != nil { | |
| 3391 | 3540 | return templ_7745c5c3_Err | |
| 3392 | 3541 | } | |
| 3393 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 315, "\"><input type=\"hidden\" name=\"source\" value=\"") | |
| 3542 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 330, "\"><input type=\"hidden\" name=\"source\" value=\"") | |
| 3394 | 3543 | if templ_7745c5c3_Err != nil { | |
| 3395 | 3544 | return templ_7745c5c3_Err | |
| 3396 | 3545 | } | |
| 3397 | - | var templ_7745c5c3_Var162 string | |
| 3398 | - | templ_7745c5c3_Var162, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Source) | |
| 3546 | + | var templ_7745c5c3_Var171 string | |
| 3547 | + | templ_7745c5c3_Var171, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Source) | |
| 3399 | 3548 | if templ_7745c5c3_Err != nil { | |
| 3400 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 667, Col: 62} | |
| 3549 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 690, Col: 62} | |
| 3401 | 3550 | } | |
| 3402 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var162) | |
| 3551 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var171) | |
| 3403 | 3552 | if templ_7745c5c3_Err != nil { | |
| 3404 | 3553 | return templ_7745c5c3_Err | |
| 3405 | 3554 | } | |
| 3406 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 316, "\"> <input type=\"hidden\" name=\"target\" value=\"") | |
| 3555 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 331, "\"> <input type=\"hidden\" name=\"target\" value=\"") | |
| 3407 | 3556 | if templ_7745c5c3_Err != nil { | |
| 3408 | 3557 | return templ_7745c5c3_Err | |
| 3409 | 3558 | } | |
| 3410 | - | var templ_7745c5c3_Var163 string | |
| 3411 | - | templ_7745c5c3_Var163, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Target) | |
| 3559 | + | var templ_7745c5c3_Var172 string | |
| 3560 | + | templ_7745c5c3_Var172, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Target) | |
| 3412 | 3561 | if templ_7745c5c3_Err != nil { | |
| 3413 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 668, Col: 62} | |
| 3562 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 691, Col: 62} | |
| 3414 | 3563 | } | |
| 3415 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var163) | |
| 3564 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var172) | |
| 3416 | 3565 | if templ_7745c5c3_Err != nil { | |
| 3417 | 3566 | return templ_7745c5c3_Err | |
| 3418 | 3567 | } | |
| 3419 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 317, "\"> <label for=\"mr-title\">title</label> <input id=\"mr-title\" name=\"title\" type=\"text\" maxlength=\"120\" required value=\"") | |
| 3568 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 332, "\"> <label for=\"mr-title\">title</label> <input id=\"mr-title\" name=\"title\" type=\"text\" maxlength=\"120\" required value=\"") | |
| 3420 | 3569 | if templ_7745c5c3_Err != nil { | |
| 3421 | 3570 | return templ_7745c5c3_Err | |
| 3422 | 3571 | } | |
| 3423 | - | var templ_7745c5c3_Var164 string | |
| 3424 | - | templ_7745c5c3_Var164, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Title) | |
| 3572 | + | var templ_7745c5c3_Var173 string | |
| 3573 | + | templ_7745c5c3_Var173, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Title) | |
| 3425 | 3574 | if templ_7745c5c3_Err != nil { | |
| 3426 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 670, Col: 97} | |
| 3575 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 693, Col: 97} | |
| 3427 | 3576 | } | |
| 3428 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var164) | |
| 3577 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var173) | |
| 3429 | 3578 | if templ_7745c5c3_Err != nil { | |
| 3430 | 3579 | return templ_7745c5c3_Err | |
| 3431 | 3580 | } | |
| 3432 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 318, "\" autocomplete=\"off\"> <label for=\"mr-desc\">description</label> <textarea id=\"mr-desc\" name=\"description\" rows=\"4\" maxlength=\"8000\" placeholder=\"Markdown, optional\"></textarea><div class=\"f-btns\"><button type=\"submit\" class=\"btn primary\">Create merge request</button></div></form>") | |
| 3581 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 333, "\" autocomplete=\"off\"> <label for=\"mr-desc\">description</label> <textarea id=\"mr-desc\" name=\"description\" rows=\"4\" maxlength=\"8000\" placeholder=\"Markdown, optional\"></textarea><div class=\"f-btns\"><button type=\"submit\" class=\"btn primary\">Create merge request</button></div></form>") | |
| 3433 | 3582 | if templ_7745c5c3_Err != nil { | |
| 3434 | 3583 | return templ_7745c5c3_Err | |
| 3435 | 3584 | } | |
| 3436 | 3585 | } | |
| 3437 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 319, " ") | |
| 3586 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 334, " ") | |
| 3438 | 3587 | if templ_7745c5c3_Err != nil { | |
| 3439 | 3588 | return templ_7745c5c3_Err | |
| 3440 | 3589 | } | |
| 3441 | 3590 | if p.HasDiff { | |
| 3442 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 320, "<div class=\"diff-tools\" role=\"group\" aria-label=\"Diff view\"><span class=\"dim\">") | |
| 3591 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 335, "<div class=\"diff-tools\" role=\"group\" aria-label=\"Diff view\"><span class=\"dim\">") | |
| 3443 | 3592 | if templ_7745c5c3_Err != nil { | |
| 3444 | 3593 | return templ_7745c5c3_Err | |
| 3445 | 3594 | } | |
| 3446 | - | var templ_7745c5c3_Var165 string | |
| 3447 | - | templ_7745c5c3_Var165, templ_7745c5c3_Err = templ.JoinStringErrs(plural(p.NFiles, "file", "files")) | |
| 3595 | + | var templ_7745c5c3_Var174 string | |
| 3596 | + | templ_7745c5c3_Var174, templ_7745c5c3_Err = templ.JoinStringErrs(plural(p.NFiles, "file", "files")) | |
| 3448 | 3597 | if templ_7745c5c3_Err != nil { | |
| 3449 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 680, Col: 57} | |
| 3598 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 703, Col: 57} | |
| 3450 | 3599 | } | |
| 3451 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var165)) | |
| 3600 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var174)) | |
| 3452 | 3601 | if templ_7745c5c3_Err != nil { | |
| 3453 | 3602 | return templ_7745c5c3_Err | |
| 3454 | 3603 | } | |
| 3455 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 321, " · <span class=\"plus\">+") | |
| 3604 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 336, " · <span class=\"plus\">+") | |
| 3456 | 3605 | if templ_7745c5c3_Err != nil { | |
| 3457 | 3606 | return templ_7745c5c3_Err | |
| 3458 | 3607 | } | |
| 3459 | - | var templ_7745c5c3_Var166 string | |
| 3460 | - | templ_7745c5c3_Var166, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Adds)) | |
| 3608 | + | var templ_7745c5c3_Var175 string | |
| 3609 | + | templ_7745c5c3_Var175, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Adds)) | |
| 3461 | 3610 | if templ_7745c5c3_Err != nil { | |
| 3462 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 680, Col: 97} | |
| 3611 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 703, Col: 97} | |
| 3463 | 3612 | } | |
| 3464 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var166)) | |
| 3613 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var175)) | |
| 3465 | 3614 | if templ_7745c5c3_Err != nil { | |
| 3466 | 3615 | return templ_7745c5c3_Err | |
| 3467 | 3616 | } | |
| 3468 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 322, "</span> <span class=\"minus\">-") | |
| 3617 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 337, "</span> <span class=\"minus\">-") | |
| 3469 | 3618 | if templ_7745c5c3_Err != nil { | |
| 3470 | 3619 | return templ_7745c5c3_Err | |
| 3471 | 3620 | } | |
| 3472 | - | var templ_7745c5c3_Var167 string | |
| 3473 | - | templ_7745c5c3_Var167, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Dels)) | |
| 3621 | + | var templ_7745c5c3_Var176 string | |
| 3622 | + | templ_7745c5c3_Var176, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Dels)) | |
| 3474 | 3623 | if templ_7745c5c3_Err != nil { | |
| 3475 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 680, Col: 142} | |
| 3624 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 703, Col: 142} | |
| 3476 | 3625 | } | |
| 3477 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var167)) | |
| 3626 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var176)) | |
| 3478 | 3627 | if templ_7745c5c3_Err != nil { | |
| 3479 | 3628 | return templ_7745c5c3_Err | |
| 3480 | 3629 | } | |
| 3481 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 323, "</span></span> <span class=\"grow\"></span>") | |
| 3630 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 338, "</span></span> <span class=\"grow\"></span>") | |
| 3482 | 3631 | if templ_7745c5c3_Err != nil { | |
| 3483 | 3632 | return templ_7745c5c3_Err | |
| 3484 | 3633 | } | |
| @@ -3486,64 +3635,64 @@ func Compare(l Layout, p ComparePage) templ.Component { | |||
| 3486 | 3635 | if templ_7745c5c3_Err != nil { | |
| 3487 | 3636 | return templ_7745c5c3_Err | |
| 3488 | 3637 | } | |
| 3489 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 324, "</div>") | |
| 3638 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 339, "</div>") | |
| 3490 | 3639 | if templ_7745c5c3_Err != nil { | |
| 3491 | 3640 | return templ_7745c5c3_Err | |
| 3492 | 3641 | } | |
| 3493 | 3642 | if p.Invisible { | |
| 3494 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 325, "<p class=\"notice\">this diff holds invisible characters (direction controls, zero-width characters). They are shown as <span class=\"inv\"><U+XXXX></span> markers, never applied.</p>") | |
| 3643 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 340, "<p class=\"notice\">this diff holds invisible characters (direction controls, zero-width characters). They are shown as <span class=\"inv\"><U+XXXX></span> markers, never applied.</p>") | |
| 3495 | 3644 | if templ_7745c5c3_Err != nil { | |
| 3496 | 3645 | return templ_7745c5c3_Err | |
| 3497 | 3646 | } | |
| 3498 | 3647 | } | |
| 3499 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 326, " <div id=\"diffs\"") | |
| 3648 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 341, " <div id=\"diffs\"") | |
| 3500 | 3649 | if templ_7745c5c3_Err != nil { | |
| 3501 | 3650 | return templ_7745c5c3_Err | |
| 3502 | 3651 | } | |
| 3503 | 3652 | if p.Both { | |
| 3504 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 327, " data-diff=\"") | |
| 3653 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 342, " data-diff=\"") | |
| 3505 | 3654 | if templ_7745c5c3_Err != nil { | |
| 3506 | 3655 | return templ_7745c5c3_Err | |
| 3507 | 3656 | } | |
| 3508 | - | var templ_7745c5c3_Var168 string | |
| 3509 | - | templ_7745c5c3_Var168, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.View) | |
| 3657 | + | var templ_7745c5c3_Var177 string | |
| 3658 | + | templ_7745c5c3_Var177, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.View) | |
| 3510 | 3659 | if templ_7745c5c3_Err != nil { | |
| 3511 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 693, Col: 23} | |
| 3660 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 716, Col: 23} | |
| 3512 | 3661 | } | |
| 3513 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var168) | |
| 3662 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var177) | |
| 3514 | 3663 | if templ_7745c5c3_Err != nil { | |
| 3515 | 3664 | return templ_7745c5c3_Err | |
| 3516 | 3665 | } | |
| 3517 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 328, "\"") | |
| 3666 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 343, "\"") | |
| 3518 | 3667 | if templ_7745c5c3_Err != nil { | |
| 3519 | 3668 | return templ_7745c5c3_Err | |
| 3520 | 3669 | } | |
| 3521 | 3670 | } else { | |
| 3522 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 329, " data-view=\"") | |
| 3671 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 344, " data-view=\"") | |
| 3523 | 3672 | if templ_7745c5c3_Err != nil { | |
| 3524 | 3673 | return templ_7745c5c3_Err | |
| 3525 | 3674 | } | |
| 3526 | - | var templ_7745c5c3_Var169 string | |
| 3527 | - | templ_7745c5c3_Var169, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.View) | |
| 3675 | + | var templ_7745c5c3_Var178 string | |
| 3676 | + | templ_7745c5c3_Var178, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.View) | |
| 3528 | 3677 | if templ_7745c5c3_Err != nil { | |
| 3529 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 695, Col: 23} | |
| 3678 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 718, Col: 23} | |
| 3530 | 3679 | } | |
| 3531 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var169) | |
| 3680 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var178) | |
| 3532 | 3681 | if templ_7745c5c3_Err != nil { | |
| 3533 | 3682 | return templ_7745c5c3_Err | |
| 3534 | 3683 | } | |
| 3535 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 330, "\"") | |
| 3684 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 345, "\"") | |
| 3536 | 3685 | if templ_7745c5c3_Err != nil { | |
| 3537 | 3686 | return templ_7745c5c3_Err | |
| 3538 | 3687 | } | |
| 3539 | 3688 | } | |
| 3540 | 3689 | if p.Both && !p.Pinned { | |
| 3541 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 331, " hx-live=\"this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff\"") | |
| 3690 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 346, " hx-live=\"this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff\"") | |
| 3542 | 3691 | if templ_7745c5c3_Err != nil { | |
| 3543 | 3692 | return templ_7745c5c3_Err | |
| 3544 | 3693 | } | |
| 3545 | 3694 | } | |
| 3546 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 332, ">") | |
| 3695 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 347, ">") | |
| 3547 | 3696 | if templ_7745c5c3_Err != nil { | |
| 3548 | 3697 | return templ_7745c5c3_Err | |
| 3549 | 3698 | } | |
| @@ -3553,14 +3702,14 @@ func Compare(l Layout, p ComparePage) templ.Component { | |||
| 3553 | 3702 | return templ_7745c5c3_Err | |
| 3554 | 3703 | } | |
| 3555 | 3704 | } | |
| 3556 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 333, "</div>") | |
| 3705 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 348, "</div>") | |
| 3557 | 3706 | if templ_7745c5c3_Err != nil { | |
| 3558 | 3707 | return templ_7745c5c3_Err | |
| 3559 | 3708 | } | |
| 3560 | 3709 | } | |
| 3561 | 3710 | return nil | |
| 3562 | 3711 | }) | |
| 3563 | - | templ_7745c5c3_Err = Shell(l, compareRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var150), templ_7745c5c3_Buffer) | |
| 3712 | + | templ_7745c5c3_Err = Shell(l, compareRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var159), templ_7745c5c3_Buffer) | |
| 3564 | 3713 | if templ_7745c5c3_Err != nil { | |
| 3565 | 3714 | return templ_7745c5c3_Err | |
| 3566 | 3715 | } | |
| @@ -3584,173 +3733,173 @@ func compareRail(p ComparePage) templ.Component { | |||
| 3584 | 3733 | }() | |
| 3585 | 3734 | } | |
| 3586 | 3735 | ctx = templ.InitializeContext(ctx) | |
| 3587 | - | templ_7745c5c3_Var170 := templ.GetChildren(ctx) | |
| 3588 | - | if templ_7745c5c3_Var170 == nil { | |
| 3589 | - | templ_7745c5c3_Var170 = templ.NopComponent | |
| 3736 | + | templ_7745c5c3_Var179 := templ.GetChildren(ctx) | |
| 3737 | + | if templ_7745c5c3_Var179 == nil { | |
| 3738 | + | templ_7745c5c3_Var179 = templ.NopComponent | |
| 3590 | 3739 | } | |
| 3591 | 3740 | ctx = templ.ClearChildren(ctx) | |
| 3592 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 334, "<section aria-labelledby=\"r-ahead\"><h2 id=\"r-ahead\">Commits <span class=\"count\">") | |
| 3741 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 349, "<section aria-labelledby=\"r-ahead\"><h2 id=\"r-ahead\">Commits <span class=\"count\">") | |
| 3593 | 3742 | if templ_7745c5c3_Err != nil { | |
| 3594 | 3743 | return templ_7745c5c3_Err | |
| 3595 | 3744 | } | |
| 3596 | - | var templ_7745c5c3_Var171 string | |
| 3597 | - | templ_7745c5c3_Var171, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Ahead))) | |
| 3745 | + | var templ_7745c5c3_Var180 string | |
| 3746 | + | templ_7745c5c3_Var180, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Ahead))) | |
| 3598 | 3747 | if templ_7745c5c3_Err != nil { | |
| 3599 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 711, Col: 67} | |
| 3748 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 734, Col: 67} | |
| 3600 | 3749 | } | |
| 3601 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var171)) | |
| 3750 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var180)) | |
| 3602 | 3751 | if templ_7745c5c3_Err != nil { | |
| 3603 | 3752 | return templ_7745c5c3_Err | |
| 3604 | 3753 | } | |
| 3605 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 335, "</span></h2><ul class=\"pcommits\">") | |
| 3754 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 350, "</span></h2><ul class=\"pcommits\">") | |
| 3606 | 3755 | if templ_7745c5c3_Err != nil { | |
| 3607 | 3756 | return templ_7745c5c3_Err | |
| 3608 | 3757 | } | |
| 3609 | 3758 | for _, c := range p.Ahead { | |
| 3610 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 336, "<li><a href=\"") | |
| 3759 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 351, "<li><a href=\"") | |
| 3611 | 3760 | if templ_7745c5c3_Err != nil { | |
| 3612 | 3761 | return templ_7745c5c3_Err | |
| 3613 | 3762 | } | |
| 3614 | - | var templ_7745c5c3_Var172 templ.SafeURL | |
| 3615 | - | templ_7745c5c3_Var172, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.CHref)) | |
| 3763 | + | var templ_7745c5c3_Var181 templ.SafeURL | |
| 3764 | + | templ_7745c5c3_Var181, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.CHref)) | |
| 3616 | 3765 | if templ_7745c5c3_Err != nil { | |
| 3617 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 715, Col: 37} | |
| 3766 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 738, Col: 37} | |
| 3618 | 3767 | } | |
| 3619 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var172)) | |
| 3768 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var181)) | |
| 3620 | 3769 | if templ_7745c5c3_Err != nil { | |
| 3621 | 3770 | return templ_7745c5c3_Err | |
| 3622 | 3771 | } | |
| 3623 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 337, "\">") | |
| 3772 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 352, "\">") | |
| 3624 | 3773 | if templ_7745c5c3_Err != nil { | |
| 3625 | 3774 | return templ_7745c5c3_Err | |
| 3626 | 3775 | } | |
| 3627 | - | var templ_7745c5c3_Var173 string | |
| 3628 | - | templ_7745c5c3_Var173, templ_7745c5c3_Err = templ.JoinStringErrs(c.Short) | |
| 3776 | + | var templ_7745c5c3_Var182 string | |
| 3777 | + | templ_7745c5c3_Var182, templ_7745c5c3_Err = templ.JoinStringErrs(c.Short) | |
| 3629 | 3778 | if templ_7745c5c3_Err != nil { | |
| 3630 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 715, Col: 49} | |
| 3779 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 738, Col: 49} | |
| 3631 | 3780 | } | |
| 3632 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var173)) | |
| 3781 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var182)) | |
| 3633 | 3782 | if templ_7745c5c3_Err != nil { | |
| 3634 | 3783 | return templ_7745c5c3_Err | |
| 3635 | 3784 | } | |
| 3636 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 338, "</a> <span class=\"s\">") | |
| 3785 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 353, "</a> <span class=\"s\">") | |
| 3637 | 3786 | if templ_7745c5c3_Err != nil { | |
| 3638 | 3787 | return templ_7745c5c3_Err | |
| 3639 | 3788 | } | |
| 3640 | - | var templ_7745c5c3_Var174 string | |
| 3641 | - | templ_7745c5c3_Var174, templ_7745c5c3_Err = templ.JoinStringErrs(c.Subject) | |
| 3789 | + | var templ_7745c5c3_Var183 string | |
| 3790 | + | templ_7745c5c3_Var183, templ_7745c5c3_Err = templ.JoinStringErrs(c.Subject) | |
| 3642 | 3791 | if templ_7745c5c3_Err != nil { | |
| 3643 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 716, Col: 32} | |
| 3792 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 739, Col: 32} | |
| 3644 | 3793 | } | |
| 3645 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var174)) | |
| 3794 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var183)) | |
| 3646 | 3795 | if templ_7745c5c3_Err != nil { | |
| 3647 | 3796 | return templ_7745c5c3_Err | |
| 3648 | 3797 | } | |
| 3649 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 339, "</span> <span class=\"mute\">") | |
| 3798 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 354, "</span> <span class=\"mute\">") | |
| 3650 | 3799 | if templ_7745c5c3_Err != nil { | |
| 3651 | 3800 | return templ_7745c5c3_Err | |
| 3652 | 3801 | } | |
| 3653 | - | var templ_7745c5c3_Var175 string | |
| 3654 | - | templ_7745c5c3_Var175, templ_7745c5c3_Err = templ.JoinStringErrs(c.Author) | |
| 3802 | + | var templ_7745c5c3_Var184 string | |
| 3803 | + | templ_7745c5c3_Var184, templ_7745c5c3_Err = templ.JoinStringErrs(c.Author) | |
| 3655 | 3804 | if templ_7745c5c3_Err != nil { | |
| 3656 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 718, Col: 16} | |
| 3805 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 741, Col: 16} | |
| 3657 | 3806 | } | |
| 3658 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var175)) | |
| 3807 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var184)) | |
| 3659 | 3808 | if templ_7745c5c3_Err != nil { | |
| 3660 | 3809 | return templ_7745c5c3_Err | |
| 3661 | 3810 | } | |
| 3662 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 340, " ") | |
| 3811 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 355, " ") | |
| 3663 | 3812 | if templ_7745c5c3_Err != nil { | |
| 3664 | 3813 | return templ_7745c5c3_Err | |
| 3665 | 3814 | } | |
| 3666 | 3815 | if c.WhenAt != "" { | |
| 3667 | - | var templ_7745c5c3_Var176 string | |
| 3668 | - | templ_7745c5c3_Var176, templ_7745c5c3_Err = templ.JoinStringErrs(" · ") | |
| 3816 | + | var templ_7745c5c3_Var185 string | |
| 3817 | + | templ_7745c5c3_Var185, templ_7745c5c3_Err = templ.JoinStringErrs(" · ") | |
| 3669 | 3818 | if templ_7745c5c3_Err != nil { | |
| 3670 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 720, Col: 15} | |
| 3819 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 743, Col: 15} | |
| 3671 | 3820 | } | |
| 3672 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var176)) | |
| 3821 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var185)) | |
| 3673 | 3822 | if templ_7745c5c3_Err != nil { | |
| 3674 | 3823 | return templ_7745c5c3_Err | |
| 3675 | 3824 | } | |
| 3676 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 341, "<time datetime=\"") | |
| 3825 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 356, "<time datetime=\"") | |
| 3677 | 3826 | if templ_7745c5c3_Err != nil { | |
| 3678 | 3827 | return templ_7745c5c3_Err | |
| 3679 | 3828 | } | |
| 3680 | - | var templ_7745c5c3_Var177 string | |
| 3681 | - | templ_7745c5c3_Var177, templ_7745c5c3_Err = templ.ResolveAttributeValue(c.WhenAt) | |
| 3829 | + | var templ_7745c5c3_Var186 string | |
| 3830 | + | templ_7745c5c3_Var186, templ_7745c5c3_Err = templ.ResolveAttributeValue(c.WhenAt) | |
| 3682 | 3831 | if templ_7745c5c3_Err != nil { | |
| 3683 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 720, Col: 42} | |
| 3832 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 743, Col: 42} | |
| 3684 | 3833 | } | |
| 3685 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var177) | |
| 3834 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var186) | |
| 3686 | 3835 | if templ_7745c5c3_Err != nil { | |
| 3687 | 3836 | return templ_7745c5c3_Err | |
| 3688 | 3837 | } | |
| 3689 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 342, "\">") | |
| 3838 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 357, "\">") | |
| 3690 | 3839 | if templ_7745c5c3_Err != nil { | |
| 3691 | 3840 | return templ_7745c5c3_Err | |
| 3692 | 3841 | } | |
| 3693 | - | var templ_7745c5c3_Var178 string | |
| 3694 | - | templ_7745c5c3_Var178, templ_7745c5c3_Err = templ.JoinStringErrs(c.When) | |
| 3842 | + | var templ_7745c5c3_Var187 string | |
| 3843 | + | templ_7745c5c3_Var187, templ_7745c5c3_Err = templ.JoinStringErrs(c.When) | |
| 3695 | 3844 | if templ_7745c5c3_Err != nil { | |
| 3696 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 720, Col: 53} | |
| 3845 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 743, Col: 53} | |
| 3697 | 3846 | } | |
| 3698 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var178)) | |
| 3847 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var187)) | |
| 3699 | 3848 | if templ_7745c5c3_Err != nil { | |
| 3700 | 3849 | return templ_7745c5c3_Err | |
| 3701 | 3850 | } | |
| 3702 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 343, "</time>") | |
| 3851 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 358, "</time>") | |
| 3703 | 3852 | if templ_7745c5c3_Err != nil { | |
| 3704 | 3853 | return templ_7745c5c3_Err | |
| 3705 | 3854 | } | |
| 3706 | 3855 | } | |
| 3707 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 344, "</span></li>") | |
| 3856 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 359, "</span></li>") | |
| 3708 | 3857 | if templ_7745c5c3_Err != nil { | |
| 3709 | 3858 | return templ_7745c5c3_Err | |
| 3710 | 3859 | } | |
| 3711 | 3860 | } | |
| 3712 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 345, "</ul>") | |
| 3861 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 360, "</ul>") | |
| 3713 | 3862 | if templ_7745c5c3_Err != nil { | |
| 3714 | 3863 | return templ_7745c5c3_Err | |
| 3715 | 3864 | } | |
| 3716 | 3865 | if len(p.Ahead) == 0 { | |
| 3717 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 346, "<p class=\"dim\">no commit ahead of ") | |
| 3866 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 361, "<p class=\"dim\">no commit ahead of ") | |
| 3718 | 3867 | if templ_7745c5c3_Err != nil { | |
| 3719 | 3868 | return templ_7745c5c3_Err | |
| 3720 | 3869 | } | |
| 3721 | - | var templ_7745c5c3_Var179 string | |
| 3722 | - | templ_7745c5c3_Var179, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | |
| 3870 | + | var templ_7745c5c3_Var188 string | |
| 3871 | + | templ_7745c5c3_Var188, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | |
| 3723 | 3872 | if templ_7745c5c3_Err != nil { | |
| 3724 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 727, Col: 47} | |
| 3873 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 750, Col: 47} | |
| 3725 | 3874 | } | |
| 3726 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var179)) | |
| 3875 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var188)) | |
| 3727 | 3876 | if templ_7745c5c3_Err != nil { | |
| 3728 | 3877 | return templ_7745c5c3_Err | |
| 3729 | 3878 | } | |
| 3730 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 347, ".</p>") | |
| 3879 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 362, ".</p>") | |
| 3731 | 3880 | if templ_7745c5c3_Err != nil { | |
| 3732 | 3881 | return templ_7745c5c3_Err | |
| 3733 | 3882 | } | |
| 3734 | 3883 | } | |
| 3735 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 348, "</section>") | |
| 3884 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 363, "</section>") | |
| 3736 | 3885 | if templ_7745c5c3_Err != nil { | |
| 3737 | 3886 | return templ_7745c5c3_Err | |
| 3738 | 3887 | } | |
| 3739 | 3888 | if p.HasDiff { | |
| 3740 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 349, "<section aria-labelledby=\"r-files\"><h2 id=\"r-files\">Files <span class=\"count\">") | |
| 3889 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 364, "<section aria-labelledby=\"r-files\"><h2 id=\"r-files\">Files <span class=\"count\">") | |
| 3741 | 3890 | if templ_7745c5c3_Err != nil { | |
| 3742 | 3891 | return templ_7745c5c3_Err | |
| 3743 | 3892 | } | |
| 3744 | - | var templ_7745c5c3_Var180 string | |
| 3745 | - | templ_7745c5c3_Var180, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Files))) | |
| 3893 | + | var templ_7745c5c3_Var189 string | |
| 3894 | + | templ_7745c5c3_Var189, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Files))) | |
| 3746 | 3895 | if templ_7745c5c3_Err != nil { | |
| 3747 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 732, Col: 66} | |
| 3896 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 755, Col: 66} | |
| 3748 | 3897 | } | |
| 3749 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var180)) | |
| 3898 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var189)) | |
| 3750 | 3899 | if templ_7745c5c3_Err != nil { | |
| 3751 | 3900 | return templ_7745c5c3_Err | |
| 3752 | 3901 | } | |
| 3753 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 350, "</span></h2>") | |
| 3902 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 365, "</span></h2>") | |
| 3754 | 3903 | if templ_7745c5c3_Err != nil { | |
| 3755 | 3904 | return templ_7745c5c3_Err | |
| 3756 | 3905 | } | |
| @@ -3758,12 +3907,12 @@ func compareRail(p ComparePage) templ.Component { | |||
| 3758 | 3907 | if templ_7745c5c3_Err != nil { | |
| 3759 | 3908 | return templ_7745c5c3_Err | |
| 3760 | 3909 | } | |
| 3761 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 351, "</section>") | |
| 3910 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 366, "</section>") | |
| 3762 | 3911 | if templ_7745c5c3_Err != nil { | |
| 3763 | 3912 | return templ_7745c5c3_Err | |
| 3764 | 3913 | } | |
| 3765 | 3914 | } | |
| 3766 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 352, "<section aria-labelledby=\"r-cli\"><h2 id=\"r-cli\">From a terminal</h2>") | |
| 3915 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 367, "<section aria-labelledby=\"r-cli\"><h2 id=\"r-cli\">From a terminal</h2>") | |
| 3767 | 3916 | if templ_7745c5c3_Err != nil { | |
| 3768 | 3917 | return templ_7745c5c3_Err | |
| 3769 | 3918 | } | |
| @@ -3771,7 +3920,7 @@ func compareRail(p ComparePage) templ.Component { | |||
| 3771 | 3920 | if templ_7745c5c3_Err != nil { | |
| 3772 | 3921 | return templ_7745c5c3_Err | |
| 3773 | 3922 | } | |
| 3774 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 353, "</section>") | |
| 3923 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 368, "</section>") | |
| 3775 | 3924 | if templ_7745c5c3_Err != nil { | |
| 3776 | 3925 | return templ_7745c5c3_Err | |
| 3777 | 3926 | } | |
| @@ -2571,185 +2571,334 @@ func mergeMenu(p MRPage) templ.Component { | |||||
| 2571 | if templ_7745c5c3_Err != nil { | 2571 | if templ_7745c5c3_Err != nil { | ||
| 2572 | return templ_7745c5c3_Err | 2572 | return templ_7745c5c3_Err | ||
| 2573 | } | 2573 | } | ||
| 2574 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 240, " <form class=\"d-acts\" method=\"post\" action=\"") | 2574 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 240, " ") |
| 2575 | if templ_7745c5c3_Err != nil { | 2575 | if templ_7745c5c3_Err != nil { | ||
| 2576 | return templ_7745c5c3_Err | 2576 | return templ_7745c5c3_Err | ||
| 2577 | } | 2577 | } | ||
| 2578 | - | var templ_7745c5c3_Var120 templ.SafeURL | 2578 | + | if p.Box.AutoMerge != nil { |
| 2579 | - | templ_7745c5c3_Var120, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.MergeAction)) | 2579 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 241, "<form class=\"d-acts\" method=\"post\" action=\"") |
| 2580 | + | if templ_7745c5c3_Err != nil { | |||
| 2581 | + | return templ_7745c5c3_Err | |||
| 2582 | + | } | |||
| 2583 | + | var templ_7745c5c3_Var120 templ.SafeURL | |||
| 2584 | + | templ_7745c5c3_Var120, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.CancelAutoAction)) | |||
| 2585 | + | if templ_7745c5c3_Err != nil { | |||
| 2586 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 512, Col: 86} | |||
| 2587 | + | } | |||
| 2588 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var120)) | |||
| 2589 | + | if templ_7745c5c3_Err != nil { | |||
| 2590 | + | return templ_7745c5c3_Err | |||
| 2591 | + | } | |||
| 2592 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, "\"><p class=\"dim\" role=\"status\">Auto-merge: ") | |||
| 2593 | + | if templ_7745c5c3_Err != nil { | |||
| 2594 | + | return templ_7745c5c3_Err | |||
| 2595 | + | } | |||
| 2596 | + | var templ_7745c5c3_Var121 string | |||
| 2597 | + | templ_7745c5c3_Var121, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.AutoMerge.Mode) | |||
| 2598 | + | if templ_7745c5c3_Err != nil { | |||
| 2599 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 514, Col: 41} | |||
| 2600 | + | } | |||
| 2601 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var121)) | |||
| 2602 | + | if templ_7745c5c3_Err != nil { | |||
| 2603 | + | return templ_7745c5c3_Err | |||
| 2604 | + | } | |||
| 2605 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 243, " when ready, enabled by ") | |||
| 2606 | + | if templ_7745c5c3_Err != nil { | |||
| 2607 | + | return templ_7745c5c3_Err | |||
| 2608 | + | } | |||
| 2609 | + | var templ_7745c5c3_Var122 string | |||
| 2610 | + | templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.AutoMerge.EnabledBy) | |||
| 2611 | + | if templ_7745c5c3_Err != nil { | |||
| 2612 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 514, Col: 94} | |||
| 2613 | + | } | |||
| 2614 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var122)) | |||
| 2615 | + | if templ_7745c5c3_Err != nil { | |||
| 2616 | + | return templ_7745c5c3_Err | |||
| 2617 | + | } | |||
| 2618 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, " ") | |||
| 2619 | + | if templ_7745c5c3_Err != nil { | |||
| 2620 | + | return templ_7745c5c3_Err | |||
| 2621 | + | } | |||
| 2622 | + | if p.Box.AutoMerge.When != "" { | |||
| 2623 | + | var templ_7745c5c3_Var123 string | |||
| 2624 | + | templ_7745c5c3_Var123, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |||
| 2625 | + | if templ_7745c5c3_Err != nil { | |||
| 2626 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 516, Col: 13} | |||
| 2627 | + | } | |||
| 2628 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var123)) | |||
| 2629 | + | if templ_7745c5c3_Err != nil { | |||
| 2630 | + | return templ_7745c5c3_Err | |||
| 2631 | + | } | |||
| 2632 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 245, "<time datetime=\"") | |||
| 2633 | + | if templ_7745c5c3_Err != nil { | |||
| 2634 | + | return templ_7745c5c3_Err | |||
| 2635 | + | } | |||
| 2636 | + | var templ_7745c5c3_Var124 string | |||
| 2637 | + | templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.AutoMerge.WhenAt) | |||
| 2638 | + | if templ_7745c5c3_Err != nil { | |||
| 2639 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 516, Col: 54} | |||
| 2640 | + | } | |||
| 2641 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var124) | |||
| 2642 | + | if templ_7745c5c3_Err != nil { | |||
| 2643 | + | return templ_7745c5c3_Err | |||
| 2644 | + | } | |||
| 2645 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 246, "\">") | |||
| 2646 | + | if templ_7745c5c3_Err != nil { | |||
| 2647 | + | return templ_7745c5c3_Err | |||
| 2648 | + | } | |||
| 2649 | + | var templ_7745c5c3_Var125 string | |||
| 2650 | + | templ_7745c5c3_Var125, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.AutoMerge.When) | |||
| 2651 | + | if templ_7745c5c3_Err != nil { | |||
| 2652 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 516, Col: 79} | |||
| 2653 | + | } | |||
| 2654 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125)) | |||
| 2655 | + | if templ_7745c5c3_Err != nil { | |||
| 2656 | + | return templ_7745c5c3_Err | |||
| 2657 | + | } | |||
| 2658 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 247, "</time> ") | |||
| 2659 | + | if templ_7745c5c3_Err != nil { | |||
| 2660 | + | return templ_7745c5c3_Err | |||
| 2661 | + | } | |||
| 2662 | + | } | |||
| 2663 | + | var templ_7745c5c3_Var126 string | |||
| 2664 | + | templ_7745c5c3_Var126, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |||
| 2665 | + | if templ_7745c5c3_Err != nil { | |||
| 2666 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 518, Col: 12} | |||
| 2667 | + | } | |||
| 2668 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var126)) | |||
| 2669 | + | if templ_7745c5c3_Err != nil { | |||
| 2670 | + | return templ_7745c5c3_Err | |||
| 2671 | + | } | |||
| 2672 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 248, "(head ") | |||
| 2673 | + | if templ_7745c5c3_Err != nil { | |||
| 2674 | + | return templ_7745c5c3_Err | |||
| 2675 | + | } | |||
| 2676 | + | var templ_7745c5c3_Var127 string | |||
| 2677 | + | templ_7745c5c3_Var127, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.AutoMerge.HeadShort) | |||
| 2678 | + | if templ_7745c5c3_Err != nil { | |||
| 2679 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 518, Col: 47} | |||
| 2680 | + | } | |||
| 2681 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var127)) | |||
| 2682 | + | if templ_7745c5c3_Err != nil { | |||
| 2683 | + | return templ_7745c5c3_Err | |||
| 2684 | + | } | |||
| 2685 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 249, ")</p><div class=\"d-btns\"><button type=\"submit\" class=\"btn\">Cancel auto-merge</button></div></form>") | |||
| 2686 | + | if templ_7745c5c3_Err != nil { | |||
| 2687 | + | return templ_7745c5c3_Err | |||
| 2688 | + | } | |||
| 2689 | + | } | |||
| 2690 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 250, " <form class=\"d-acts\" method=\"post\" action=\"") | |||
| 2580 | if templ_7745c5c3_Err != nil { | 2691 | if templ_7745c5c3_Err != nil { | ||
| 2581 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 511, Col: 80} | 2692 | + | return templ_7745c5c3_Err |
| 2693 | + | } | |||
| 2694 | + | var templ_7745c5c3_Var128 templ.SafeURL | |||
| 2695 | + | templ_7745c5c3_Var128, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.MergeAction)) | |||
| 2696 | + | if templ_7745c5c3_Err != nil { | |||
| 2697 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 525, Col: 80} | |||
| 2582 | } | 2698 | } | ||
| 2583 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var120)) | 2699 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var128)) |
| 2584 | if templ_7745c5c3_Err != nil { | 2700 | if templ_7745c5c3_Err != nil { | ||
| 2585 | return templ_7745c5c3_Err | 2701 | return templ_7745c5c3_Err | ||
| 2586 | } | 2702 | } | ||
| 2587 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 241, "\"><input type=\"hidden\" name=\"head_id\" value=\"") | 2703 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 251, "\"><input type=\"hidden\" name=\"head_id\" value=\"") |
| 2588 | if templ_7745c5c3_Err != nil { | 2704 | if templ_7745c5c3_Err != nil { | ||
| 2589 | return templ_7745c5c3_Err | 2705 | return templ_7745c5c3_Err | ||
| 2590 | } | 2706 | } | ||
| 2591 | - | var templ_7745c5c3_Var121 string | 2707 | + | var templ_7745c5c3_Var129 string |
| 2592 | - | templ_7745c5c3_Var121, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.Head) | 2708 | + | templ_7745c5c3_Var129, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.Head) |
| 2593 | if templ_7745c5c3_Err != nil { | 2709 | if templ_7745c5c3_Err != nil { | ||
| 2594 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 512, Col: 59} | 2710 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 526, Col: 59} |
| 2595 | } | 2711 | } | ||
| 2596 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var121) | 2712 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var129) |
| 2597 | if templ_7745c5c3_Err != nil { | 2713 | if templ_7745c5c3_Err != nil { | ||
| 2598 | return templ_7745c5c3_Err | 2714 | return templ_7745c5c3_Err | ||
| 2599 | } | 2715 | } | ||
| 2600 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, "\"><fieldset class=\"d-modes\"><legend class=\"sr\">merge mode</legend> ") | 2716 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 252, "\"><fieldset class=\"d-modes\"><legend class=\"sr\">merge mode</legend> ") |
| 2601 | if templ_7745c5c3_Err != nil { | 2717 | if templ_7745c5c3_Err != nil { | ||
| 2602 | return templ_7745c5c3_Err | 2718 | return templ_7745c5c3_Err | ||
| 2603 | } | 2719 | } | ||
| 2604 | for i, m := range p.Box.Modes { | 2720 | for i, m := range p.Box.Modes { | ||
| 2605 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 243, "<label><input type=\"radio\" name=\"mode\" value=\"") | 2721 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 253, "<label><input type=\"radio\" name=\"mode\" value=\"") |
| 2606 | if templ_7745c5c3_Err != nil { | 2722 | if templ_7745c5c3_Err != nil { | ||
| 2607 | return templ_7745c5c3_Err | 2723 | return templ_7745c5c3_Err | ||
| 2608 | } | 2724 | } | ||
| 2609 | - | var templ_7745c5c3_Var122 string | 2725 | + | var templ_7745c5c3_Var130 string |
| 2610 | - | templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.ResolveAttributeValue(m.Value) | 2726 | + | templ_7745c5c3_Var130, templ_7745c5c3_Err = templ.ResolveAttributeValue(m.Value) |
| 2611 | if templ_7745c5c3_Err != nil { | 2727 | if templ_7745c5c3_Err != nil { | ||
| 2612 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 520, Col: 24} | 2728 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 534, Col: 24} |
| 2613 | } | 2729 | } | ||
| 2614 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var122) | 2730 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var130) |
| 2615 | if templ_7745c5c3_Err != nil { | 2731 | if templ_7745c5c3_Err != nil { | ||
| 2616 | return templ_7745c5c3_Err | 2732 | return templ_7745c5c3_Err | ||
| 2617 | } | 2733 | } | ||
| 2618 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, "\"") | 2734 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 254, "\"") |
| 2619 | if templ_7745c5c3_Err != nil { | 2735 | if templ_7745c5c3_Err != nil { | ||
| 2620 | return templ_7745c5c3_Err | 2736 | return templ_7745c5c3_Err | ||
| 2621 | } | 2737 | } | ||
| 2622 | if i == p.Box.Checked() { | 2738 | if i == p.Box.Checked() { | ||
| 2623 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 245, " checked") | 2739 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 255, " checked") |
| 2624 | if templ_7745c5c3_Err != nil { | 2740 | if templ_7745c5c3_Err != nil { | ||
| 2625 | return templ_7745c5c3_Err | 2741 | return templ_7745c5c3_Err | ||
| 2626 | } | 2742 | } | ||
| 2627 | } | 2743 | } | ||
| 2628 | if m.Disabled { | 2744 | if m.Disabled { | ||
| 2629 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 246, " disabled") | 2745 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 256, " disabled") |
| 2630 | if templ_7745c5c3_Err != nil { | 2746 | if templ_7745c5c3_Err != nil { | ||
| 2631 | return templ_7745c5c3_Err | 2747 | return templ_7745c5c3_Err | ||
| 2632 | } | 2748 | } | ||
| 2633 | } | 2749 | } | ||
| 2634 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 247, " title=\"") | 2750 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 257, " title=\"") |
| 2635 | if templ_7745c5c3_Err != nil { | 2751 | if templ_7745c5c3_Err != nil { | ||
| 2636 | return templ_7745c5c3_Err | 2752 | return templ_7745c5c3_Err | ||
| 2637 | } | 2753 | } | ||
| 2638 | - | var templ_7745c5c3_Var123 string | 2754 | + | var templ_7745c5c3_Var131 string |
| 2639 | - | templ_7745c5c3_Var123, templ_7745c5c3_Err = templ.ResolveAttributeValue(m.Reason) | 2755 | + | templ_7745c5c3_Var131, templ_7745c5c3_Err = templ.ResolveAttributeValue(m.Reason) |
| 2640 | if templ_7745c5c3_Err != nil { | 2756 | if templ_7745c5c3_Err != nil { | ||
| 2641 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 523, Col: 25} | 2757 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 537, Col: 25} |
| 2642 | } | 2758 | } | ||
| 2643 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var123) | 2759 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var131) |
| 2644 | if templ_7745c5c3_Err != nil { | 2760 | if templ_7745c5c3_Err != nil { | ||
| 2645 | return templ_7745c5c3_Err | 2761 | return templ_7745c5c3_Err | ||
| 2646 | } | 2762 | } | ||
| 2647 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 248, "\" :disabled=\"this.value === 'fast-forward' ? q('[data-mergeability]').data.ffOk !== true : q('[data-mergeability]').data.mergeOk !== true\" :title=\"this.value === 'fast-forward' ? q('[data-mergeability]').data.ffReason : q('[data-mergeability]').data.mergeReason\"> ") | 2763 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 258, "\" :disabled=\"this.value === 'fast-forward' ? q('[data-mergeability]').data.ffOk !== true : q('[data-mergeability]').data.mergeOk !== true\" :title=\"this.value === 'fast-forward' ? q('[data-mergeability]').data.ffReason : q('[data-mergeability]').data.mergeReason\"> ") |
| 2648 | if templ_7745c5c3_Err != nil { | 2764 | if templ_7745c5c3_Err != nil { | ||
| 2649 | return templ_7745c5c3_Err | 2765 | return templ_7745c5c3_Err | ||
| 2650 | } | 2766 | } | ||
| 2651 | - | var templ_7745c5c3_Var124 string | 2767 | + | var templ_7745c5c3_Var132 string |
| 2652 | - | templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.JoinStringErrs(m.Label) | 2768 | + | templ_7745c5c3_Var132, templ_7745c5c3_Err = templ.JoinStringErrs(m.Label) |
| 2653 | if templ_7745c5c3_Err != nil { | 2769 | if templ_7745c5c3_Err != nil { | ||
| 2654 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 527, Col: 17} | 2770 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 541, Col: 17} |
| 2655 | } | 2771 | } | ||
| 2656 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var124)) | 2772 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var132)) |
| 2657 | if templ_7745c5c3_Err != nil { | 2773 | if templ_7745c5c3_Err != nil { | ||
| 2658 | return templ_7745c5c3_Err | 2774 | return templ_7745c5c3_Err | ||
| 2659 | } | 2775 | } | ||
| 2660 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 249, " ") | 2776 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 259, " ") |
| 2661 | if templ_7745c5c3_Err != nil { | 2777 | if templ_7745c5c3_Err != nil { | ||
| 2662 | return templ_7745c5c3_Err | 2778 | return templ_7745c5c3_Err | ||
| 2663 | } | 2779 | } | ||
| 2664 | if i < 9 { | 2780 | if i < 9 { | ||
| 2665 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 250, "<kbd aria-hidden=\"true\">") | 2781 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 260, "<kbd aria-hidden=\"true\">") |
| 2666 | if templ_7745c5c3_Err != nil { | 2782 | if templ_7745c5c3_Err != nil { | ||
| 2667 | return templ_7745c5c3_Err | 2783 | return templ_7745c5c3_Err | ||
| 2668 | } | 2784 | } | ||
| 2669 | - | var templ_7745c5c3_Var125 string | 2785 | + | var templ_7745c5c3_Var133 string |
| 2670 | - | templ_7745c5c3_Var125, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(i + 1)) | 2786 | + | templ_7745c5c3_Var133, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(i + 1)) |
| 2671 | if templ_7745c5c3_Err != nil { | 2787 | if templ_7745c5c3_Err != nil { | ||
| 2672 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 529, Col: 46} | 2788 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 543, Col: 46} |
| 2673 | } | 2789 | } | ||
| 2674 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125)) | 2790 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var133)) |
| 2675 | if templ_7745c5c3_Err != nil { | 2791 | if templ_7745c5c3_Err != nil { | ||
| 2676 | return templ_7745c5c3_Err | 2792 | return templ_7745c5c3_Err | ||
| 2677 | } | 2793 | } | ||
| 2678 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 251, "</kbd>") | 2794 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 261, "</kbd>") |
| 2679 | if templ_7745c5c3_Err != nil { | 2795 | if templ_7745c5c3_Err != nil { | ||
| 2680 | return templ_7745c5c3_Err | 2796 | return templ_7745c5c3_Err | ||
| 2681 | } | 2797 | } | ||
| 2682 | } | 2798 | } | ||
| 2683 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 252, "</label>") | 2799 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 262, "</label>") |
| 2684 | if templ_7745c5c3_Err != nil { | 2800 | if templ_7745c5c3_Err != nil { | ||
| 2685 | return templ_7745c5c3_Err | 2801 | return templ_7745c5c3_Err | ||
| 2686 | } | 2802 | } | ||
| 2687 | } | 2803 | } | ||
| 2688 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 253, "</fieldset>") | 2804 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 263, "</fieldset>") |
| 2689 | if templ_7745c5c3_Err != nil { | 2805 | if templ_7745c5c3_Err != nil { | ||
| 2690 | return templ_7745c5c3_Err | 2806 | return templ_7745c5c3_Err | ||
| 2691 | } | 2807 | } | ||
| 2692 | if p.Box.CanDeleteBranch { | 2808 | if p.Box.CanDeleteBranch { | ||
| 2693 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 254, "<label class=\"d-check\"><input type=\"checkbox\" name=\"delete_branch\" value=\"1\"> delete ") | 2809 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 264, "<label class=\"d-check\"><input type=\"checkbox\" name=\"delete_branch\" value=\"1\"> delete ") |
| 2694 | if templ_7745c5c3_Err != nil { | 2810 | if templ_7745c5c3_Err != nil { | ||
| 2695 | return templ_7745c5c3_Err | 2811 | return templ_7745c5c3_Err | ||
| 2696 | } | 2812 | } | ||
| 2697 | - | var templ_7745c5c3_Var126 string | 2813 | + | var templ_7745c5c3_Var134 string |
| 2698 | - | templ_7745c5c3_Var126, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) | 2814 | + | templ_7745c5c3_Var134, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) |
| 2699 | if templ_7745c5c3_Err != nil { | 2815 | if templ_7745c5c3_Err != nil { | ||
| 2700 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 535, Col: 102} | 2816 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 549, Col: 102} |
| 2701 | } | 2817 | } | ||
| 2702 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var126)) | 2818 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var134)) |
| 2703 | if templ_7745c5c3_Err != nil { | 2819 | if templ_7745c5c3_Err != nil { | ||
| 2704 | return templ_7745c5c3_Err | 2820 | return templ_7745c5c3_Err | ||
| 2705 | } | 2821 | } | ||
| 2706 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 255, " after the merge <kbd aria-hidden=\"true\">D</kbd></label>") | 2822 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 265, " after the merge <kbd aria-hidden=\"true\">D</kbd></label>") |
| 2707 | if templ_7745c5c3_Err != nil { | 2823 | if templ_7745c5c3_Err != nil { | ||
| 2708 | return templ_7745c5c3_Err | 2824 | return templ_7745c5c3_Err | ||
| 2709 | } | 2825 | } | ||
| 2710 | } | 2826 | } | ||
| 2711 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 256, "<div class=\"d-btns\"><button type=\"submit\" class=\"btn primary\" data-default") | 2827 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 266, "<div class=\"d-btns\"><button type=\"submit\" class=\"btn primary\" data-default") |
| 2712 | if templ_7745c5c3_Err != nil { | 2828 | if templ_7745c5c3_Err != nil { | ||
| 2713 | return templ_7745c5c3_Err | 2829 | return templ_7745c5c3_Err | ||
| 2714 | } | 2830 | } | ||
| 2715 | if !p.Box.CanMerge() { | 2831 | if !p.Box.CanMerge() { | ||
| 2716 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 257, " disabled") | 2832 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 267, " disabled") |
| 2717 | if templ_7745c5c3_Err != nil { | 2833 | if templ_7745c5c3_Err != nil { | ||
| 2718 | return templ_7745c5c3_Err | 2834 | return templ_7745c5c3_Err | ||
| 2719 | } | 2835 | } | ||
| 2720 | } | 2836 | } | ||
| 2721 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 258, " title=\"") | 2837 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 268, " title=\"") |
| 2722 | if templ_7745c5c3_Err != nil { | 2838 | if templ_7745c5c3_Err != nil { | ||
| 2723 | return templ_7745c5c3_Err | 2839 | return templ_7745c5c3_Err | ||
| 2724 | } | 2840 | } | ||
| 2725 | - | var templ_7745c5c3_Var127 string | 2841 | + | var templ_7745c5c3_Var135 string |
| 2726 | - | templ_7745c5c3_Var127, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.MergeTitle()) | 2842 | + | templ_7745c5c3_Var135, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.MergeTitle()) |
| 2727 | if templ_7745c5c3_Err != nil { | 2843 | if templ_7745c5c3_Err != nil { | ||
| 2728 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 543, Col: 33} | 2844 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 557, Col: 33} |
| 2729 | } | 2845 | } | ||
| 2730 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var127) | 2846 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var135) |
| 2731 | if templ_7745c5c3_Err != nil { | 2847 | if templ_7745c5c3_Err != nil { | ||
| 2732 | return templ_7745c5c3_Err | 2848 | return templ_7745c5c3_Err | ||
| 2733 | } | 2849 | } | ||
| 2734 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 259, "\" :disabled=\"!this.form.querySelector('input[name=mode]:checked:not(:disabled)')\" :title=\"(this.form.querySelector('input[name=mode]:checked') || {}).title || ''\">Merge into ") | 2850 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 269, "\" :disabled=\"!this.form.querySelector('input[name=mode]:checked:not(:disabled)')\" :title=\"(this.form.querySelector('input[name=mode]:checked') || {}).title || ''\">Merge into ") |
| 2735 | if templ_7745c5c3_Err != nil { | 2851 | if templ_7745c5c3_Err != nil { | ||
| 2736 | return templ_7745c5c3_Err | 2852 | return templ_7745c5c3_Err | ||
| 2737 | } | 2853 | } | ||
| 2738 | - | var templ_7745c5c3_Var128 string | 2854 | + | var templ_7745c5c3_Var136 string |
| 2739 | - | templ_7745c5c3_Var128, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | 2855 | + | templ_7745c5c3_Var136, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) |
| 2740 | if templ_7745c5c3_Err != nil { | 2856 | if templ_7745c5c3_Err != nil { | ||
| 2741 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 546, Col: 28} | 2857 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 560, Col: 28} |
| 2742 | } | 2858 | } | ||
| 2743 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var128)) | 2859 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var136)) |
| 2744 | if templ_7745c5c3_Err != nil { | 2860 | if templ_7745c5c3_Err != nil { | ||
| 2745 | return templ_7745c5c3_Err | 2861 | return templ_7745c5c3_Err | ||
| 2746 | } | 2862 | } | ||
| 2747 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 260, "</button></div></form>") | 2863 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 270, "</button> ") |
| 2864 | + | if templ_7745c5c3_Err != nil { | |||
| 2865 | + | return templ_7745c5c3_Err | |||
| 2866 | + | } | |||
| 2867 | + | if p.Box.CanAutoMerge { | |||
| 2868 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 271, "<button type=\"submit\" class=\"btn\" formaction=\"") | |||
| 2869 | + | if templ_7745c5c3_Err != nil { | |||
| 2870 | + | return templ_7745c5c3_Err | |||
| 2871 | + | } | |||
| 2872 | + | var templ_7745c5c3_Var137 string | |||
| 2873 | + | templ_7745c5c3_Var137, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.SafeURL(p.Box.AutoAction)) | |||
| 2874 | + | if templ_7745c5c3_Err != nil { | |||
| 2875 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 565, Col: 52} | |||
| 2876 | + | } | |||
| 2877 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var137) | |||
| 2878 | + | if templ_7745c5c3_Err != nil { | |||
| 2879 | + | return templ_7745c5c3_Err | |||
| 2880 | + | } | |||
| 2881 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 272, "\"") | |||
| 2882 | + | if templ_7745c5c3_Err != nil { | |||
| 2883 | + | return templ_7745c5c3_Err | |||
| 2884 | + | } | |||
| 2885 | + | if len(p.Box.Modes) == 0 { | |||
| 2886 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 273, " disabled") | |||
| 2887 | + | if templ_7745c5c3_Err != nil { | |||
| 2888 | + | return templ_7745c5c3_Err | |||
| 2889 | + | } | |||
| 2890 | + | } | |||
| 2891 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 274, " title=\"merge once the checks pass\">Merge when ready</button>") | |||
| 2892 | + | if templ_7745c5c3_Err != nil { | |||
| 2893 | + | return templ_7745c5c3_Err | |||
| 2894 | + | } | |||
| 2895 | + | } | |||
| 2896 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 275, "</div></form>") | |||
| 2748 | if templ_7745c5c3_Err != nil { | 2897 | if templ_7745c5c3_Err != nil { | ||
| 2749 | return templ_7745c5c3_Err | 2898 | return templ_7745c5c3_Err | ||
| 2750 | } | 2899 | } | ||
| 2751 | } | 2900 | } | ||
| 2752 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 261, "</div></details>") | 2901 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, "</div></details>") |
| 2753 | if templ_7745c5c3_Err != nil { | 2902 | if templ_7745c5c3_Err != nil { | ||
| 2754 | return templ_7745c5c3_Err | 2903 | return templ_7745c5c3_Err | ||
| 2755 | } | 2904 | } | ||
| @@ -2775,182 +2924,182 @@ func MRMergeability(v MergeabilityView) templ.Component { | |||||
| 2775 | }() | 2924 | }() | ||
| 2776 | } | 2925 | } | ||
| 2777 | ctx = templ.InitializeContext(ctx) | 2926 | ctx = templ.InitializeContext(ctx) | ||
| 2778 | - | templ_7745c5c3_Var129 := templ.GetChildren(ctx) | 2927 | + | templ_7745c5c3_Var138 := templ.GetChildren(ctx) |
| 2779 | - | if templ_7745c5c3_Var129 == nil { | 2928 | + | if templ_7745c5c3_Var138 == nil { |
| 2780 | - | templ_7745c5c3_Var129 = templ.NopComponent | 2929 | + | templ_7745c5c3_Var138 = templ.NopComponent |
| 2781 | } | 2930 | } | ||
| 2782 | ctx = templ.ClearChildren(ctx) | 2931 | ctx = templ.ClearChildren(ctx) | ||
| 2783 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 262, "<span data-mergeability data-state=\"") | 2932 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 277, "<span data-mergeability data-state=\"") |
| 2784 | if templ_7745c5c3_Err != nil { | 2933 | if templ_7745c5c3_Err != nil { | ||
| 2785 | return templ_7745c5c3_Err | 2934 | return templ_7745c5c3_Err | ||
| 2786 | } | 2935 | } | ||
| 2787 | - | var templ_7745c5c3_Var130 string | 2936 | + | var templ_7745c5c3_Var139 string |
| 2788 | - | templ_7745c5c3_Var130, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.State) | 2937 | + | templ_7745c5c3_Var139, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.State) |
| 2789 | if templ_7745c5c3_Err != nil { | 2938 | if templ_7745c5c3_Err != nil { | ||
| 2790 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 559, Col: 22} | 2939 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 582, Col: 22} |
| 2791 | } | 2940 | } | ||
| 2792 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var130) | 2941 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var139) |
| 2793 | if templ_7745c5c3_Err != nil { | 2942 | if templ_7745c5c3_Err != nil { | ||
| 2794 | return templ_7745c5c3_Err | 2943 | return templ_7745c5c3_Err | ||
| 2795 | } | 2944 | } | ||
| 2796 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 263, "\" data-ff-ok=\"") | 2945 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "\" data-ff-ok=\"") |
| 2797 | if templ_7745c5c3_Err != nil { | 2946 | if templ_7745c5c3_Err != nil { | ||
| 2798 | return templ_7745c5c3_Err | 2947 | return templ_7745c5c3_Err | ||
| 2799 | } | 2948 | } | ||
| 2800 | - | var templ_7745c5c3_Var131 string | 2949 | + | var templ_7745c5c3_Var140 string |
| 2801 | - | templ_7745c5c3_Var131, templ_7745c5c3_Err = templ.ResolveAttributeValue(strconv.FormatBool(v.FFOk)) | 2950 | + | templ_7745c5c3_Var140, templ_7745c5c3_Err = templ.ResolveAttributeValue(strconv.FormatBool(v.FFOk)) |
| 2802 | if templ_7745c5c3_Err != nil { | 2951 | if templ_7745c5c3_Err != nil { | ||
| 2803 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 560, Col: 41} | 2952 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 583, Col: 41} |
| 2804 | } | 2953 | } | ||
| 2805 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var131) | 2954 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var140) |
| 2806 | if templ_7745c5c3_Err != nil { | 2955 | if templ_7745c5c3_Err != nil { | ||
| 2807 | return templ_7745c5c3_Err | 2956 | return templ_7745c5c3_Err | ||
| 2808 | } | 2957 | } | ||
| 2809 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 264, "\" data-merge-ok=\"") | 2958 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 279, "\" data-merge-ok=\"") |
| 2810 | if templ_7745c5c3_Err != nil { | 2959 | if templ_7745c5c3_Err != nil { | ||
| 2811 | return templ_7745c5c3_Err | 2960 | return templ_7745c5c3_Err | ||
| 2812 | } | 2961 | } | ||
| 2813 | - | var templ_7745c5c3_Var132 string | 2962 | + | var templ_7745c5c3_Var141 string |
| 2814 | - | templ_7745c5c3_Var132, templ_7745c5c3_Err = templ.ResolveAttributeValue(strconv.FormatBool(v.MergeOk)) | 2963 | + | templ_7745c5c3_Var141, templ_7745c5c3_Err = templ.ResolveAttributeValue(strconv.FormatBool(v.MergeOk)) |
| 2815 | if templ_7745c5c3_Err != nil { | 2964 | if templ_7745c5c3_Err != nil { | ||
| 2816 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 561, Col: 47} | 2965 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 584, Col: 47} |
| 2817 | } | 2966 | } | ||
| 2818 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var132) | 2967 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var141) |
| 2819 | if templ_7745c5c3_Err != nil { | 2968 | if templ_7745c5c3_Err != nil { | ||
| 2820 | return templ_7745c5c3_Err | 2969 | return templ_7745c5c3_Err | ||
| 2821 | } | 2970 | } | ||
| 2822 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 265, "\" data-ff-reason=\"") | 2971 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 280, "\" data-ff-reason=\"") |
| 2823 | if templ_7745c5c3_Err != nil { | 2972 | if templ_7745c5c3_Err != nil { | ||
| 2824 | return templ_7745c5c3_Err | 2973 | return templ_7745c5c3_Err | ||
| 2825 | } | 2974 | } | ||
| 2826 | - | var templ_7745c5c3_Var133 string | 2975 | + | var templ_7745c5c3_Var142 string |
| 2827 | - | templ_7745c5c3_Var133, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.FFReason) | 2976 | + | templ_7745c5c3_Var142, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.FFReason) |
| 2828 | if templ_7745c5c3_Err != nil { | 2977 | if templ_7745c5c3_Err != nil { | ||
| 2829 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 562, Col: 29} | 2978 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 585, Col: 29} |
| 2830 | } | 2979 | } | ||
| 2831 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var133) | 2980 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var142) |
| 2832 | if templ_7745c5c3_Err != nil { | 2981 | if templ_7745c5c3_Err != nil { | ||
| 2833 | return templ_7745c5c3_Err | 2982 | return templ_7745c5c3_Err | ||
| 2834 | } | 2983 | } | ||
| 2835 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 266, "\" data-merge-reason=\"") | 2984 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 281, "\" data-merge-reason=\"") |
| 2836 | if templ_7745c5c3_Err != nil { | 2985 | if templ_7745c5c3_Err != nil { | ||
| 2837 | return templ_7745c5c3_Err | 2986 | return templ_7745c5c3_Err | ||
| 2838 | } | 2987 | } | ||
| 2839 | - | var templ_7745c5c3_Var134 string | 2988 | + | var templ_7745c5c3_Var143 string |
| 2840 | - | templ_7745c5c3_Var134, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.MergeReason) | 2989 | + | templ_7745c5c3_Var143, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.MergeReason) |
| 2841 | if templ_7745c5c3_Err != nil { | 2990 | if templ_7745c5c3_Err != nil { | ||
| 2842 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 563, Col: 35} | 2991 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 586, Col: 35} |
| 2843 | } | 2992 | } | ||
| 2844 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var134) | 2993 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var143) |
| 2845 | if templ_7745c5c3_Err != nil { | 2994 | if templ_7745c5c3_Err != nil { | ||
| 2846 | return templ_7745c5c3_Err | 2995 | return templ_7745c5c3_Err | ||
| 2847 | } | 2996 | } | ||
| 2848 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 267, "\"><span class=\"badge\" data-state=\"") | 2997 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 282, "\"><span class=\"badge\" data-state=\"") |
| 2849 | if templ_7745c5c3_Err != nil { | 2998 | if templ_7745c5c3_Err != nil { | ||
| 2850 | return templ_7745c5c3_Err | 2999 | return templ_7745c5c3_Err | ||
| 2851 | } | 3000 | } | ||
| 2852 | - | var templ_7745c5c3_Var135 string | 3001 | + | var templ_7745c5c3_Var144 string |
| 2853 | - | templ_7745c5c3_Var135, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.State) | 3002 | + | templ_7745c5c3_Var144, templ_7745c5c3_Err = templ.ResolveAttributeValue(v.State) |
| 2854 | if templ_7745c5c3_Err != nil { | 3003 | if templ_7745c5c3_Err != nil { | ||
| 2855 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 565, Col: 42} | 3004 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 588, Col: 42} |
| 2856 | } | 3005 | } | ||
| 2857 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var135) | 3006 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var144) |
| 2858 | if templ_7745c5c3_Err != nil { | 3007 | if templ_7745c5c3_Err != nil { | ||
| 2859 | return templ_7745c5c3_Err | 3008 | return templ_7745c5c3_Err | ||
| 2860 | } | 3009 | } | ||
| 2861 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 268, "\">") | 3010 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 283, "\">") |
| 2862 | if templ_7745c5c3_Err != nil { | 3011 | if templ_7745c5c3_Err != nil { | ||
| 2863 | return templ_7745c5c3_Err | 3012 | return templ_7745c5c3_Err | ||
| 2864 | } | 3013 | } | ||
| 2865 | - | var templ_7745c5c3_Var136 string | 3014 | + | var templ_7745c5c3_Var145 string |
| 2866 | - | templ_7745c5c3_Var136, templ_7745c5c3_Err = templ.JoinStringErrs(v.Label) | 3015 | + | templ_7745c5c3_Var145, templ_7745c5c3_Err = templ.JoinStringErrs(v.Label) |
| 2867 | if templ_7745c5c3_Err != nil { | 3016 | if templ_7745c5c3_Err != nil { | ||
| 2868 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 565, Col: 54} | 3017 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 588, Col: 54} |
| 2869 | } | 3018 | } | ||
| 2870 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var136)) | 3019 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var145)) |
| 2871 | if templ_7745c5c3_Err != nil { | 3020 | if templ_7745c5c3_Err != nil { | ||
| 2872 | return templ_7745c5c3_Err | 3021 | return templ_7745c5c3_Err | ||
| 2873 | } | 3022 | } | ||
| 2874 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 269, "</span> ") | 3023 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 284, "</span> ") |
| 2875 | if templ_7745c5c3_Err != nil { | 3024 | if templ_7745c5c3_Err != nil { | ||
| 2876 | return templ_7745c5c3_Err | 3025 | return templ_7745c5c3_Err | ||
| 2877 | } | 3026 | } | ||
| 2878 | if v.Detail != "" { | 3027 | if v.Detail != "" { | ||
| 2879 | - | var templ_7745c5c3_Var137 string | 3028 | + | var templ_7745c5c3_Var146 string |
| 2880 | - | templ_7745c5c3_Var137, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | 3029 | + | templ_7745c5c3_Var146, templ_7745c5c3_Err = templ.JoinStringErrs(" ") |
| 2881 | if templ_7745c5c3_Err != nil { | 3030 | if templ_7745c5c3_Err != nil { | ||
| 2882 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 567, Col: 8} | 3031 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 590, Col: 8} |
| 2883 | } | 3032 | } | ||
| 2884 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var137)) | 3033 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var146)) |
| 2885 | if templ_7745c5c3_Err != nil { | 3034 | if templ_7745c5c3_Err != nil { | ||
| 2886 | return templ_7745c5c3_Err | 3035 | return templ_7745c5c3_Err | ||
| 2887 | } | 3036 | } | ||
| 2888 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 270, "<span class=\"dim\">") | 3037 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 285, "<span class=\"dim\">") |
| 2889 | if templ_7745c5c3_Err != nil { | 3038 | if templ_7745c5c3_Err != nil { | ||
| 2890 | return templ_7745c5c3_Err | 3039 | return templ_7745c5c3_Err | ||
| 2891 | } | 3040 | } | ||
| 2892 | - | var templ_7745c5c3_Var138 string | 3041 | + | var templ_7745c5c3_Var147 string |
| 2893 | - | templ_7745c5c3_Var138, templ_7745c5c3_Err = templ.JoinStringErrs(v.Detail) | 3042 | + | templ_7745c5c3_Var147, templ_7745c5c3_Err = templ.JoinStringErrs(v.Detail) |
| 2894 | if templ_7745c5c3_Err != nil { | 3043 | if templ_7745c5c3_Err != nil { | ||
| 2895 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 567, Col: 38} | 3044 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 590, Col: 38} |
| 2896 | } | 3045 | } | ||
| 2897 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var138)) | 3046 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var147)) |
| 2898 | if templ_7745c5c3_Err != nil { | 3047 | if templ_7745c5c3_Err != nil { | ||
| 2899 | return templ_7745c5c3_Err | 3048 | return templ_7745c5c3_Err | ||
| 2900 | } | 3049 | } | ||
| 2901 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 271, "</span>") | 3050 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 286, "</span>") |
| 2902 | if templ_7745c5c3_Err != nil { | 3051 | if templ_7745c5c3_Err != nil { | ||
| 2903 | return templ_7745c5c3_Err | 3052 | return templ_7745c5c3_Err | ||
| 2904 | } | 3053 | } | ||
| 2905 | } | 3054 | } | ||
| 2906 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 272, "</span> ") | 3055 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 287, "</span> ") |
| 2907 | if templ_7745c5c3_Err != nil { | 3056 | if templ_7745c5c3_Err != nil { | ||
| 2908 | return templ_7745c5c3_Err | 3057 | return templ_7745c5c3_Err | ||
| 2909 | } | 3058 | } | ||
| 2910 | if len(v.Paths) > 0 { | 3059 | if len(v.Paths) > 0 { | ||
| 2911 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 273, "<ul class=\"mg-paths\" aria-label=\"conflicting files\">") | 3060 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 288, "<ul class=\"mg-paths\" aria-label=\"conflicting files\">") |
| 2912 | if templ_7745c5c3_Err != nil { | 3061 | if templ_7745c5c3_Err != nil { | ||
| 2913 | return templ_7745c5c3_Err | 3062 | return templ_7745c5c3_Err | ||
| 2914 | } | 3063 | } | ||
| 2915 | for _, path := range v.Paths { | 3064 | for _, path := range v.Paths { | ||
| 2916 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 274, "<li><code>") | 3065 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 289, "<li><code>") |
| 2917 | if templ_7745c5c3_Err != nil { | 3066 | if templ_7745c5c3_Err != nil { | ||
| 2918 | return templ_7745c5c3_Err | 3067 | return templ_7745c5c3_Err | ||
| 2919 | } | 3068 | } | ||
| 2920 | - | var templ_7745c5c3_Var139 string | 3069 | + | var templ_7745c5c3_Var148 string |
| 2921 | - | templ_7745c5c3_Var139, templ_7745c5c3_Err = templ.JoinStringErrs(path) | 3070 | + | templ_7745c5c3_Var148, templ_7745c5c3_Err = templ.JoinStringErrs(path) |
| 2922 | if templ_7745c5c3_Err != nil { | 3071 | if templ_7745c5c3_Err != nil { | ||
| 2923 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 573, Col: 20} | 3072 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 596, Col: 20} |
| 2924 | } | 3073 | } | ||
| 2925 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var139)) | 3074 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var148)) |
| 2926 | if templ_7745c5c3_Err != nil { | 3075 | if templ_7745c5c3_Err != nil { | ||
| 2927 | return templ_7745c5c3_Err | 3076 | return templ_7745c5c3_Err | ||
| 2928 | } | 3077 | } | ||
| 2929 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 275, "</code></li>") | 3078 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 290, "</code></li>") |
| 2930 | if templ_7745c5c3_Err != nil { | 3079 | if templ_7745c5c3_Err != nil { | ||
| 2931 | return templ_7745c5c3_Err | 3080 | return templ_7745c5c3_Err | ||
| 2932 | } | 3081 | } | ||
| 2933 | } | 3082 | } | ||
| 2934 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, "</ul>") | 3083 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 291, "</ul>") |
| 2935 | if templ_7745c5c3_Err != nil { | 3084 | if templ_7745c5c3_Err != nil { | ||
| 2936 | return templ_7745c5c3_Err | 3085 | return templ_7745c5c3_Err | ||
| 2937 | } | 3086 | } | ||
| 2938 | } | 3087 | } | ||
| 2939 | if v.PathsNote != "" { | 3088 | if v.PathsNote != "" { | ||
| 2940 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 277, "<p class=\"dim\">") | 3089 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 292, "<p class=\"dim\">") |
| 2941 | if templ_7745c5c3_Err != nil { | 3090 | if templ_7745c5c3_Err != nil { | ||
| 2942 | return templ_7745c5c3_Err | 3091 | return templ_7745c5c3_Err | ||
| 2943 | } | 3092 | } | ||
| 2944 | - | var templ_7745c5c3_Var140 string | 3093 | + | var templ_7745c5c3_Var149 string |
| 2945 | - | templ_7745c5c3_Var140, templ_7745c5c3_Err = templ.JoinStringErrs(v.PathsNote) | 3094 | + | templ_7745c5c3_Var149, templ_7745c5c3_Err = templ.JoinStringErrs(v.PathsNote) |
| 2946 | if templ_7745c5c3_Err != nil { | 3095 | if templ_7745c5c3_Err != nil { | ||
| 2947 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 578, Col: 30} | 3096 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 601, Col: 30} |
| 2948 | } | 3097 | } | ||
| 2949 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var140)) | 3098 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var149)) |
| 2950 | if templ_7745c5c3_Err != nil { | 3099 | if templ_7745c5c3_Err != nil { | ||
| 2951 | return templ_7745c5c3_Err | 3100 | return templ_7745c5c3_Err | ||
| 2952 | } | 3101 | } | ||
| 2953 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "</p>") | 3102 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 293, "</p>") |
| 2954 | if templ_7745c5c3_Err != nil { | 3103 | if templ_7745c5c3_Err != nil { | ||
| 2955 | return templ_7745c5c3_Err | 3104 | return templ_7745c5c3_Err | ||
| 2956 | } | 3105 | } | ||
| @@ -2977,12 +3126,12 @@ func mrMergeabilitySlot(v MergeabilityView) templ.Component { | |||||
| 2977 | }() | 3126 | }() | ||
| 2978 | } | 3127 | } | ||
| 2979 | ctx = templ.InitializeContext(ctx) | 3128 | ctx = templ.InitializeContext(ctx) | ||
| 2980 | - | templ_7745c5c3_Var141 := templ.GetChildren(ctx) | 3129 | + | templ_7745c5c3_Var150 := templ.GetChildren(ctx) |
| 2981 | - | if templ_7745c5c3_Var141 == nil { | 3130 | + | if templ_7745c5c3_Var150 == nil { |
| 2982 | - | templ_7745c5c3_Var141 = templ.NopComponent | 3131 | + | templ_7745c5c3_Var150 = templ.NopComponent |
| 2983 | } | 3132 | } | ||
| 2984 | ctx = templ.ClearChildren(ctx) | 3133 | ctx = templ.ClearChildren(ctx) | ||
| 2985 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 279, "<div id=\"mr-mergeability\" class=\"live-slot\" role=\"status\" data-slot>") | 3134 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 294, "<div id=\"mr-mergeability\" class=\"live-slot\" role=\"status\" data-slot>") |
| 2986 | if templ_7745c5c3_Err != nil { | 3135 | if templ_7745c5c3_Err != nil { | ||
| 2987 | return templ_7745c5c3_Err | 3136 | return templ_7745c5c3_Err | ||
| 2988 | } | 3137 | } | ||
| @@ -2990,7 +3139,7 @@ func mrMergeabilitySlot(v MergeabilityView) templ.Component { | |||||
| 2990 | if templ_7745c5c3_Err != nil { | 3139 | if templ_7745c5c3_Err != nil { | ||
| 2991 | return templ_7745c5c3_Err | 3140 | return templ_7745c5c3_Err | ||
| 2992 | } | 3141 | } | ||
| 2993 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 280, "</div>") | 3142 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 295, "</div>") |
| 2994 | if templ_7745c5c3_Err != nil { | 3143 | if templ_7745c5c3_Err != nil { | ||
| 2995 | return templ_7745c5c3_Err | 3144 | return templ_7745c5c3_Err | ||
| 2996 | } | 3145 | } | ||
| @@ -3015,9 +3164,9 @@ func MRMergeabilityFragment(v MergeabilityView) templ.Component { | |||||
| 3015 | }() | 3164 | }() | ||
| 3016 | } | 3165 | } | ||
| 3017 | ctx = templ.InitializeContext(ctx) | 3166 | ctx = templ.InitializeContext(ctx) | ||
| 3018 | - | templ_7745c5c3_Var142 := templ.GetChildren(ctx) | 3167 | + | templ_7745c5c3_Var151 := templ.GetChildren(ctx) |
| 3019 | - | if templ_7745c5c3_Var142 == nil { | 3168 | + | if templ_7745c5c3_Var151 == nil { |
| 3020 | - | templ_7745c5c3_Var142 = templ.NopComponent | 3169 | + | templ_7745c5c3_Var151 = templ.NopComponent |
| 3021 | } | 3170 | } | ||
| 3022 | ctx = templ.ClearChildren(ctx) | 3171 | ctx = templ.ClearChildren(ctx) | ||
| 3023 | templ_7745c5c3_Err = mrMergeabilitySlot(v).Render(ctx, templ_7745c5c3_Buffer) | 3172 | templ_7745c5c3_Err = mrMergeabilitySlot(v).Render(ctx, templ_7745c5c3_Buffer) | ||
| @@ -3046,128 +3195,128 @@ func moreMenu(p MRPage) templ.Component { | |||||
| 3046 | }() | 3195 | }() | ||
| 3047 | } | 3196 | } | ||
| 3048 | ctx = templ.InitializeContext(ctx) | 3197 | ctx = templ.InitializeContext(ctx) | ||
| 3049 | - | templ_7745c5c3_Var143 := templ.GetChildren(ctx) | 3198 | + | templ_7745c5c3_Var152 := templ.GetChildren(ctx) |
| 3050 | - | if templ_7745c5c3_Var143 == nil { | 3199 | + | if templ_7745c5c3_Var152 == nil { |
| 3051 | - | templ_7745c5c3_Var143 = templ.NopComponent | 3200 | + | templ_7745c5c3_Var152 = templ.NopComponent |
| 3052 | } | 3201 | } | ||
| 3053 | ctx = templ.ClearChildren(ctx) | 3202 | ctx = templ.ClearChildren(ctx) | ||
| 3054 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 281, "<details class=\"menu omenu\"><summary class=\"btn icon\" aria-label=\"More actions\" title=\"more actions\">⋯</summary><div class=\"menu-pop\" role=\"group\" aria-label=\"More actions\"><section class=\"merge-settings\"><h2>Merge settings</h2><dl class=\"kv\"><dt>modes</dt><dd>") | 3203 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 296, "<details class=\"menu omenu\"><summary class=\"btn icon\" aria-label=\"More actions\" title=\"more actions\">⋯</summary><div class=\"menu-pop\" role=\"group\" aria-label=\"More actions\"><section class=\"merge-settings\"><h2>Merge settings</h2><dl class=\"kv\"><dt>modes</dt><dd>") |
| 3055 | if templ_7745c5c3_Err != nil { | 3204 | if templ_7745c5c3_Err != nil { | ||
| 3056 | return templ_7745c5c3_Err | 3205 | return templ_7745c5c3_Err | ||
| 3057 | } | 3206 | } | ||
| 3058 | - | var templ_7745c5c3_Var144 string | 3207 | + | var templ_7745c5c3_Var153 string |
| 3059 | - | templ_7745c5c3_Var144, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(p.Modes, ", ")) | 3208 | + | templ_7745c5c3_Var153, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(p.Modes, ", ")) |
| 3060 | if templ_7745c5c3_Err != nil { | 3209 | if templ_7745c5c3_Err != nil { | ||
| 3061 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 605, Col: 38} | 3210 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 628, Col: 38} |
| 3062 | } | 3211 | } | ||
| 3063 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var144)) | 3212 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var153)) |
| 3064 | if templ_7745c5c3_Err != nil { | 3213 | if templ_7745c5c3_Err != nil { | ||
| 3065 | return templ_7745c5c3_Err | 3214 | return templ_7745c5c3_Err | ||
| 3066 | } | 3215 | } | ||
| 3067 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 282, "</dd><dt>checks</dt><dd>") | 3216 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 297, "</dd><dt>checks</dt><dd>") |
| 3068 | if templ_7745c5c3_Err != nil { | 3217 | if templ_7745c5c3_Err != nil { | ||
| 3069 | return templ_7745c5c3_Err | 3218 | return templ_7745c5c3_Err | ||
| 3070 | } | 3219 | } | ||
| 3071 | if p.ChecksBlock { | 3220 | if p.ChecksBlock { | ||
| 3072 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 283, "failing ones block the merge") | 3221 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 298, "failing ones block the merge") |
| 3073 | if templ_7745c5c3_Err != nil { | 3222 | if templ_7745c5c3_Err != nil { | ||
| 3074 | return templ_7745c5c3_Err | 3223 | return templ_7745c5c3_Err | ||
| 3075 | } | 3224 | } | ||
| 3076 | } else { | 3225 | } else { | ||
| 3077 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 284, "do not block the merge") | 3226 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 299, "do not block the merge") |
| 3078 | if templ_7745c5c3_Err != nil { | 3227 | if templ_7745c5c3_Err != nil { | ||
| 3079 | return templ_7745c5c3_Err | 3228 | return templ_7745c5c3_Err | ||
| 3080 | } | 3229 | } | ||
| 3081 | } | 3230 | } | ||
| 3082 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 285, "</dd></dl></section>") | 3231 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 300, "</dd></dl></section>") |
| 3083 | if templ_7745c5c3_Err != nil { | 3232 | if templ_7745c5c3_Err != nil { | ||
| 3084 | return templ_7745c5c3_Err | 3233 | return templ_7745c5c3_Err | ||
| 3085 | } | 3234 | } | ||
| 3086 | if p.Box != nil { | 3235 | if p.Box != nil { | ||
| 3087 | if p.Box.Signed { | 3236 | if p.Box.Signed { | ||
| 3088 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 286, "<p class=\"d-note\" id=\"mr-signing\">squash and merge commits are signed with ermite's own key (generated on first start). ") | 3237 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 301, "<p class=\"d-note\" id=\"mr-signing\">squash and merge commits are signed with ermite's own key (generated on first start). ") |
| 3089 | if templ_7745c5c3_Err != nil { | 3238 | if templ_7745c5c3_Err != nil { | ||
| 3090 | return templ_7745c5c3_Err | 3239 | return templ_7745c5c3_Err | ||
| 3091 | } | 3240 | } | ||
| 3092 | if p.Box.Fingerprint != "" { | 3241 | if p.Box.Fingerprint != "" { | ||
| 3093 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 287, "fingerprint <code>") | 3242 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 302, "fingerprint <code>") |
| 3094 | if templ_7745c5c3_Err != nil { | 3243 | if templ_7745c5c3_Err != nil { | ||
| 3095 | return templ_7745c5c3_Err | 3244 | return templ_7745c5c3_Err | ||
| 3096 | } | 3245 | } | ||
| 3097 | - | var templ_7745c5c3_Var145 string | 3246 | + | var templ_7745c5c3_Var154 string |
| 3098 | - | templ_7745c5c3_Var145, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.Fingerprint) | 3247 | + | templ_7745c5c3_Var154, templ_7745c5c3_Err = templ.JoinStringErrs(p.Box.Fingerprint) |
| 3099 | if templ_7745c5c3_Err != nil { | 3248 | if templ_7745c5c3_Err != nil { | ||
| 3100 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 621, Col: 44} | 3249 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 644, Col: 44} |
| 3101 | } | 3250 | } | ||
| 3102 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var145)) | 3251 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var154)) |
| 3103 | if templ_7745c5c3_Err != nil { | 3252 | if templ_7745c5c3_Err != nil { | ||
| 3104 | return templ_7745c5c3_Err | 3253 | return templ_7745c5c3_Err | ||
| 3105 | } | 3254 | } | ||
| 3106 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 288, "</code> ") | 3255 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 303, "</code> ") |
| 3107 | if templ_7745c5c3_Err != nil { | 3256 | if templ_7745c5c3_Err != nil { | ||
| 3108 | return templ_7745c5c3_Err | 3257 | return templ_7745c5c3_Err | ||
| 3109 | } | 3258 | } | ||
| 3110 | } | 3259 | } | ||
| 3111 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 289, "<code>ermite signing-key show</code> prints it.</p>") | 3260 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 304, "<code>ermite signing-key show</code> prints it.</p>") |
| 3112 | if templ_7745c5c3_Err != nil { | 3261 | if templ_7745c5c3_Err != nil { | ||
| 3113 | return templ_7745c5c3_Err | 3262 | return templ_7745c5c3_Err | ||
| 3114 | } | 3263 | } | ||
| 3115 | } | 3264 | } | ||
| 3116 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 290, " ") | 3265 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 305, " ") |
| 3117 | if templ_7745c5c3_Err != nil { | 3266 | if templ_7745c5c3_Err != nil { | ||
| 3118 | return templ_7745c5c3_Err | 3267 | return templ_7745c5c3_Err | ||
| 3119 | } | 3268 | } | ||
| 3120 | if p.Box.CanMarkRead { | 3269 | if p.Box.CanMarkRead { | ||
| 3121 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 291, "<form method=\"post\" action=\"") | 3270 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 306, "<form method=\"post\" action=\"") |
| 3122 | if templ_7745c5c3_Err != nil { | 3271 | if templ_7745c5c3_Err != nil { | ||
| 3123 | return templ_7745c5c3_Err | 3272 | return templ_7745c5c3_Err | ||
| 3124 | } | 3273 | } | ||
| 3125 | - | var templ_7745c5c3_Var146 templ.SafeURL | 3274 | + | var templ_7745c5c3_Var155 templ.SafeURL |
| 3126 | - | templ_7745c5c3_Var146, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.ReadAction)) | 3275 | + | templ_7745c5c3_Var155, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.ReadAction)) |
| 3127 | if templ_7745c5c3_Err != nil { | 3276 | if templ_7745c5c3_Err != nil { | ||
| 3128 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 627, Col: 65} | 3277 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 650, Col: 65} |
| 3129 | } | 3278 | } | ||
| 3130 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var146)) | 3279 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var155)) |
| 3131 | if templ_7745c5c3_Err != nil { | 3280 | if templ_7745c5c3_Err != nil { | ||
| 3132 | return templ_7745c5c3_Err | 3281 | return templ_7745c5c3_Err | ||
| 3133 | } | 3282 | } | ||
| 3134 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 292, "\"><input type=\"hidden\" name=\"head_id\" value=\"") | 3283 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 307, "\"><input type=\"hidden\" name=\"head_id\" value=\"") |
| 3135 | if templ_7745c5c3_Err != nil { | 3284 | if templ_7745c5c3_Err != nil { | ||
| 3136 | return templ_7745c5c3_Err | 3285 | return templ_7745c5c3_Err | ||
| 3137 | } | 3286 | } | ||
| 3138 | - | var templ_7745c5c3_Var147 string | 3287 | + | var templ_7745c5c3_Var156 string |
| 3139 | - | templ_7745c5c3_Var147, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.Head) | 3288 | + | templ_7745c5c3_Var156, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Box.Head) |
| 3140 | if templ_7745c5c3_Err != nil { | 3289 | if templ_7745c5c3_Err != nil { | ||
| 3141 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 628, Col: 60} | 3290 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 651, Col: 60} |
| 3142 | } | 3291 | } | ||
| 3143 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var147) | 3292 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var156) |
| 3144 | if templ_7745c5c3_Err != nil { | 3293 | if templ_7745c5c3_Err != nil { | ||
| 3145 | return templ_7745c5c3_Err | 3294 | return templ_7745c5c3_Err | ||
| 3146 | } | 3295 | } | ||
| 3147 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 293, "\"> <button type=\"submit\" title=\"the next visit can show only what changed after this head\" class=\"btn\" aria-keyshortcuts=\"Shift+R\" data-read>Mark read <kbd aria-hidden=\"true\">R</kbd></button></form>") | 3296 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 308, "\"> <button type=\"submit\" title=\"the next visit can show only what changed after this head\" class=\"btn\" aria-keyshortcuts=\"Shift+R\" data-read>Mark read <kbd aria-hidden=\"true\">R</kbd></button></form>") |
| 3148 | if templ_7745c5c3_Err != nil { | 3297 | if templ_7745c5c3_Err != nil { | ||
| 3149 | return templ_7745c5c3_Err | 3298 | return templ_7745c5c3_Err | ||
| 3150 | } | 3299 | } | ||
| 3151 | } | 3300 | } | ||
| 3152 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 294, " <form method=\"post\" action=\"") | 3301 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 309, " <form method=\"post\" action=\"") |
| 3153 | if templ_7745c5c3_Err != nil { | 3302 | if templ_7745c5c3_Err != nil { | ||
| 3154 | return templ_7745c5c3_Err | 3303 | return templ_7745c5c3_Err | ||
| 3155 | } | 3304 | } | ||
| 3156 | - | var templ_7745c5c3_Var148 templ.SafeURL | 3305 | + | var templ_7745c5c3_Var157 templ.SafeURL |
| 3157 | - | templ_7745c5c3_Var148, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.CloseAction)) | 3306 | + | templ_7745c5c3_Var157, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Box.CloseAction)) |
| 3158 | if templ_7745c5c3_Err != nil { | 3307 | if templ_7745c5c3_Err != nil { | ||
| 3159 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 632, Col: 65} | 3308 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 655, Col: 65} |
| 3160 | } | 3309 | } | ||
| 3161 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var148)) | 3310 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var157)) |
| 3162 | if templ_7745c5c3_Err != nil { | 3311 | if templ_7745c5c3_Err != nil { | ||
| 3163 | return templ_7745c5c3_Err | 3312 | return templ_7745c5c3_Err | ||
| 3164 | } | 3313 | } | ||
| 3165 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 295, "\"><button type=\"submit\" title=\"close without merging; the branch is kept\" class=\"btn danger\">Close</button></form>") | 3314 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 310, "\"><button type=\"submit\" title=\"close without merging; the branch is kept\" class=\"btn danger\">Close</button></form>") |
| 3166 | if templ_7745c5c3_Err != nil { | 3315 | if templ_7745c5c3_Err != nil { | ||
| 3167 | return templ_7745c5c3_Err | 3316 | return templ_7745c5c3_Err | ||
| 3168 | } | 3317 | } | ||
| 3169 | if !p.Box.HeadGone && p.Box.ReadyAction == "" { | 3318 | if !p.Box.HeadGone && p.Box.ReadyAction == "" { | ||
| 3170 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 296, "<details class=\"d-or\"><summary class=\"mute\">or from a terminal</summary>") | 3319 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 311, "<details class=\"d-or\"><summary class=\"mute\">or from a terminal</summary>") |
| 3171 | if templ_7745c5c3_Err != nil { | 3320 | if templ_7745c5c3_Err != nil { | ||
| 3172 | return templ_7745c5c3_Err | 3321 | return templ_7745c5c3_Err | ||
| 3173 | } | 3322 | } | ||
| @@ -3175,13 +3324,13 @@ func moreMenu(p MRPage) templ.Component { | |||||
| 3175 | if templ_7745c5c3_Err != nil { | 3324 | if templ_7745c5c3_Err != nil { | ||
| 3176 | return templ_7745c5c3_Err | 3325 | return templ_7745c5c3_Err | ||
| 3177 | } | 3326 | } | ||
| 3178 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 297, "</details>") | 3327 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 312, "</details>") |
| 3179 | if templ_7745c5c3_Err != nil { | 3328 | if templ_7745c5c3_Err != nil { | ||
| 3180 | return templ_7745c5c3_Err | 3329 | return templ_7745c5c3_Err | ||
| 3181 | } | 3330 | } | ||
| 3182 | } | 3331 | } | ||
| 3183 | } | 3332 | } | ||
| 3184 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 298, "</div></details>") | 3333 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 313, "</div></details>") |
| 3185 | if templ_7745c5c3_Err != nil { | 3334 | if templ_7745c5c3_Err != nil { | ||
| 3186 | return templ_7745c5c3_Err | 3335 | return templ_7745c5c3_Err | ||
| 3187 | } | 3336 | } | ||
| @@ -3205,12 +3354,12 @@ func Compare(l Layout, p ComparePage) templ.Component { | |||||
| 3205 | }() | 3354 | }() | ||
| 3206 | } | 3355 | } | ||
| 3207 | ctx = templ.InitializeContext(ctx) | 3356 | ctx = templ.InitializeContext(ctx) | ||
| 3208 | - | templ_7745c5c3_Var149 := templ.GetChildren(ctx) | 3357 | + | templ_7745c5c3_Var158 := templ.GetChildren(ctx) |
| 3209 | - | if templ_7745c5c3_Var149 == nil { | 3358 | + | if templ_7745c5c3_Var158 == nil { |
| 3210 | - | templ_7745c5c3_Var149 = templ.NopComponent | 3359 | + | templ_7745c5c3_Var158 = templ.NopComponent |
| 3211 | } | 3360 | } | ||
| 3212 | ctx = templ.ClearChildren(ctx) | 3361 | ctx = templ.ClearChildren(ctx) | ||
| 3213 | - | templ_7745c5c3_Var150 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | 3362 | + | templ_7745c5c3_Var159 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { |
| 3214 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | 3363 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | ||
| 3215 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | 3364 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | ||
| 3216 | if !templ_7745c5c3_IsBuffer { | 3365 | if !templ_7745c5c3_IsBuffer { | ||
| @@ -3222,263 +3371,263 @@ func Compare(l Layout, p ComparePage) templ.Component { | |||||
| 3222 | }() | 3371 | }() | ||
| 3223 | } | 3372 | } | ||
| 3224 | ctx = templ.InitializeContext(ctx) | 3373 | ctx = templ.InitializeContext(ctx) | ||
| 3225 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 299, "<header class=\"show mr-h\"><h1>") | 3374 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 314, "<header class=\"show mr-h\"><h1>") |
| 3226 | if templ_7745c5c3_Err != nil { | 3375 | if templ_7745c5c3_Err != nil { | ||
| 3227 | return templ_7745c5c3_Err | 3376 | return templ_7745c5c3_Err | ||
| 3228 | } | 3377 | } | ||
| 3229 | - | var templ_7745c5c3_Var151 string | 3378 | + | var templ_7745c5c3_Var160 string |
| 3230 | - | templ_7745c5c3_Var151, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) | 3379 | + | templ_7745c5c3_Var160, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) |
| 3231 | if templ_7745c5c3_Err != nil { | 3380 | if templ_7745c5c3_Err != nil { | ||
| 3232 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 649, Col: 17} | 3381 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 672, Col: 17} |
| 3233 | } | 3382 | } | ||
| 3234 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var151)) | 3383 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var160)) |
| 3235 | if templ_7745c5c3_Err != nil { | 3384 | if templ_7745c5c3_Err != nil { | ||
| 3236 | return templ_7745c5c3_Err | 3385 | return templ_7745c5c3_Err | ||
| 3237 | } | 3386 | } | ||
| 3238 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 300, " → ") | 3387 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 315, " → ") |
| 3239 | if templ_7745c5c3_Err != nil { | 3388 | if templ_7745c5c3_Err != nil { | ||
| 3240 | return templ_7745c5c3_Err | 3389 | return templ_7745c5c3_Err | ||
| 3241 | } | 3390 | } | ||
| 3242 | - | var templ_7745c5c3_Var152 string | 3391 | + | var templ_7745c5c3_Var161 string |
| 3243 | - | templ_7745c5c3_Var152, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | 3392 | + | templ_7745c5c3_Var161, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) |
| 3244 | if templ_7745c5c3_Err != nil { | 3393 | if templ_7745c5c3_Err != nil { | ||
| 3245 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 649, Col: 34} | 3394 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 672, Col: 34} |
| 3246 | } | 3395 | } | ||
| 3247 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var152)) | 3396 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var161)) |
| 3248 | if templ_7745c5c3_Err != nil { | 3397 | if templ_7745c5c3_Err != nil { | ||
| 3249 | return templ_7745c5c3_Err | 3398 | return templ_7745c5c3_Err | ||
| 3250 | } | 3399 | } | ||
| 3251 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 301, "</h1><dl class=\"kv show-kv\"><dt>branch</dt><dd><a href=\"") | 3400 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 316, "</h1><dl class=\"kv show-kv\"><dt>branch</dt><dd><a href=\"") |
| 3252 | if templ_7745c5c3_Err != nil { | 3401 | if templ_7745c5c3_Err != nil { | ||
| 3253 | return templ_7745c5c3_Err | 3402 | return templ_7745c5c3_Err | ||
| 3254 | } | 3403 | } | ||
| 3255 | - | var templ_7745c5c3_Var153 templ.SafeURL | 3404 | + | var templ_7745c5c3_Var162 templ.SafeURL |
| 3256 | - | templ_7745c5c3_Var153, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.SourceHref)) | 3405 | + | templ_7745c5c3_Var162, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.SourceHref)) |
| 3257 | if templ_7745c5c3_Err != nil { | 3406 | if templ_7745c5c3_Err != nil { | ||
| 3258 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 652, Col: 45} | 3407 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 675, Col: 45} |
| 3259 | } | 3408 | } | ||
| 3260 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var153)) | 3409 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var162)) |
| 3261 | if templ_7745c5c3_Err != nil { | 3410 | if templ_7745c5c3_Err != nil { | ||
| 3262 | return templ_7745c5c3_Err | 3411 | return templ_7745c5c3_Err | ||
| 3263 | } | 3412 | } | ||
| 3264 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 302, "\">") | 3413 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 317, "\">") |
| 3265 | if templ_7745c5c3_Err != nil { | 3414 | if templ_7745c5c3_Err != nil { | ||
| 3266 | return templ_7745c5c3_Err | 3415 | return templ_7745c5c3_Err | ||
| 3267 | } | 3416 | } | ||
| 3268 | - | var templ_7745c5c3_Var154 string | 3417 | + | var templ_7745c5c3_Var163 string |
| 3269 | - | templ_7745c5c3_Var154, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) | 3418 | + | templ_7745c5c3_Var163, templ_7745c5c3_Err = templ.JoinStringErrs(p.Source) |
| 3270 | if templ_7745c5c3_Err != nil { | 3419 | if templ_7745c5c3_Err != nil { | ||
| 3271 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 652, Col: 58} | 3420 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 675, Col: 58} |
| 3272 | } | 3421 | } | ||
| 3273 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var154)) | 3422 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var163)) |
| 3274 | if templ_7745c5c3_Err != nil { | 3423 | if templ_7745c5c3_Err != nil { | ||
| 3275 | return templ_7745c5c3_Err | 3424 | return templ_7745c5c3_Err | ||
| 3276 | } | 3425 | } | ||
| 3277 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 303, "</a></dd><dt>target</dt><dd><a href=\"") | 3426 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 318, "</a></dd><dt>target</dt><dd><a href=\"") |
| 3278 | if templ_7745c5c3_Err != nil { | 3427 | if templ_7745c5c3_Err != nil { | ||
| 3279 | return templ_7745c5c3_Err | 3428 | return templ_7745c5c3_Err | ||
| 3280 | } | 3429 | } | ||
| 3281 | - | var templ_7745c5c3_Var155 templ.SafeURL | 3430 | + | var templ_7745c5c3_Var164 templ.SafeURL |
| 3282 | - | templ_7745c5c3_Var155, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.TargetHref)) | 3431 | + | templ_7745c5c3_Var164, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.TargetHref)) |
| 3283 | if templ_7745c5c3_Err != nil { | 3432 | if templ_7745c5c3_Err != nil { | ||
| 3284 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 654, Col: 45} | 3433 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 677, Col: 45} |
| 3285 | } | 3434 | } | ||
| 3286 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var155)) | 3435 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var164)) |
| 3287 | if templ_7745c5c3_Err != nil { | 3436 | if templ_7745c5c3_Err != nil { | ||
| 3288 | return templ_7745c5c3_Err | 3437 | return templ_7745c5c3_Err | ||
| 3289 | } | 3438 | } | ||
| 3290 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 304, "\">") | 3439 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 319, "\">") |
| 3291 | if templ_7745c5c3_Err != nil { | 3440 | if templ_7745c5c3_Err != nil { | ||
| 3292 | return templ_7745c5c3_Err | 3441 | return templ_7745c5c3_Err | ||
| 3293 | } | 3442 | } | ||
| 3294 | - | var templ_7745c5c3_Var156 string | 3443 | + | var templ_7745c5c3_Var165 string |
| 3295 | - | templ_7745c5c3_Var156, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | 3444 | + | templ_7745c5c3_Var165, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) |
| 3296 | if templ_7745c5c3_Err != nil { | 3445 | if templ_7745c5c3_Err != nil { | ||
| 3297 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 654, Col: 58} | 3446 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 677, Col: 58} |
| 3298 | } | 3447 | } | ||
| 3299 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var156)) | 3448 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var165)) |
| 3300 | if templ_7745c5c3_Err != nil { | 3449 | if templ_7745c5c3_Err != nil { | ||
| 3301 | return templ_7745c5c3_Err | 3450 | return templ_7745c5c3_Err | ||
| 3302 | } | 3451 | } | ||
| 3303 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 305, "</a></dd><dt>ahead</dt><dd>") | 3452 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 320, "</a></dd><dt>ahead</dt><dd>") |
| 3304 | if templ_7745c5c3_Err != nil { | 3453 | if templ_7745c5c3_Err != nil { | ||
| 3305 | return templ_7745c5c3_Err | 3454 | return templ_7745c5c3_Err | ||
| 3306 | } | 3455 | } | ||
| 3307 | - | var templ_7745c5c3_Var157 string | 3456 | + | var templ_7745c5c3_Var166 string |
| 3308 | - | templ_7745c5c3_Var157, templ_7745c5c3_Err = templ.JoinStringErrs(p.AheadText) | 3457 | + | templ_7745c5c3_Var166, templ_7745c5c3_Err = templ.JoinStringErrs(p.AheadText) |
| 3309 | if templ_7745c5c3_Err != nil { | 3458 | if templ_7745c5c3_Err != nil { | ||
| 3310 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 656, Col: 21} | 3459 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 679, Col: 21} |
| 3311 | } | 3460 | } | ||
| 3312 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var157)) | 3461 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var166)) |
| 3313 | if templ_7745c5c3_Err != nil { | 3462 | if templ_7745c5c3_Err != nil { | ||
| 3314 | return templ_7745c5c3_Err | 3463 | return templ_7745c5c3_Err | ||
| 3315 | } | 3464 | } | ||
| 3316 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 306, "</dd></dl></header>") | 3465 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 321, "</dd></dl></header>") |
| 3317 | if templ_7745c5c3_Err != nil { | 3466 | if templ_7745c5c3_Err != nil { | ||
| 3318 | return templ_7745c5c3_Err | 3467 | return templ_7745c5c3_Err | ||
| 3319 | } | 3468 | } | ||
| 3320 | if p.Note != "" { | 3469 | if p.Note != "" { | ||
| 3321 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 307, "<p class=\"notice\">") | 3470 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 322, "<p class=\"notice\">") |
| 3322 | if templ_7745c5c3_Err != nil { | 3471 | if templ_7745c5c3_Err != nil { | ||
| 3323 | return templ_7745c5c3_Err | 3472 | return templ_7745c5c3_Err | ||
| 3324 | } | 3473 | } | ||
| 3325 | - | var templ_7745c5c3_Var158 string | 3474 | + | var templ_7745c5c3_Var167 string |
| 3326 | - | templ_7745c5c3_Var158, templ_7745c5c3_Err = templ.JoinStringErrs(p.Note) | 3475 | + | templ_7745c5c3_Var167, templ_7745c5c3_Err = templ.JoinStringErrs(p.Note) |
| 3327 | if templ_7745c5c3_Err != nil { | 3476 | if templ_7745c5c3_Err != nil { | ||
| 3328 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 660, Col: 29} | 3477 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 683, Col: 29} |
| 3329 | } | 3478 | } | ||
| 3330 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var158)) | 3479 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var167)) |
| 3331 | if templ_7745c5c3_Err != nil { | 3480 | if templ_7745c5c3_Err != nil { | ||
| 3332 | return templ_7745c5c3_Err | 3481 | return templ_7745c5c3_Err | ||
| 3333 | } | 3482 | } | ||
| 3334 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 308, "</p>") | 3483 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 323, "</p>") |
| 3335 | if templ_7745c5c3_Err != nil { | 3484 | if templ_7745c5c3_Err != nil { | ||
| 3336 | return templ_7745c5c3_Err | 3485 | return templ_7745c5c3_Err | ||
| 3337 | } | 3486 | } | ||
| 3338 | } | 3487 | } | ||
| 3339 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 309, " ") | 3488 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 324, " ") |
| 3340 | if templ_7745c5c3_Err != nil { | 3489 | if templ_7745c5c3_Err != nil { | ||
| 3341 | return templ_7745c5c3_Err | 3490 | return templ_7745c5c3_Err | ||
| 3342 | } | 3491 | } | ||
| 3343 | if p.Existing != nil { | 3492 | if p.Existing != nil { | ||
| 3344 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 310, "<p class=\"notice\">an open merge request already covers these branches: <a href=\"") | 3493 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 325, "<p class=\"notice\">an open merge request already covers these branches: <a href=\"") |
| 3345 | if templ_7745c5c3_Err != nil { | 3494 | if templ_7745c5c3_Err != nil { | ||
| 3346 | return templ_7745c5c3_Err | 3495 | return templ_7745c5c3_Err | ||
| 3347 | } | 3496 | } | ||
| 3348 | - | var templ_7745c5c3_Var159 templ.SafeURL | 3497 | + | var templ_7745c5c3_Var168 templ.SafeURL |
| 3349 | - | templ_7745c5c3_Var159, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Existing.Href)) | 3498 | + | templ_7745c5c3_Var168, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Existing.Href)) |
| 3350 | if templ_7745c5c3_Err != nil { | 3499 | if templ_7745c5c3_Err != nil { | ||
| 3351 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 663, Col: 114} | 3500 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 686, Col: 114} |
| 3352 | } | 3501 | } | ||
| 3353 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var159)) | 3502 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var168)) |
| 3354 | if templ_7745c5c3_Err != nil { | 3503 | if templ_7745c5c3_Err != nil { | ||
| 3355 | return templ_7745c5c3_Err | 3504 | return templ_7745c5c3_Err | ||
| 3356 | } | 3505 | } | ||
| 3357 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 311, "\">") | 3506 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 326, "\">") |
| 3358 | if templ_7745c5c3_Err != nil { | 3507 | if templ_7745c5c3_Err != nil { | ||
| 3359 | return templ_7745c5c3_Err | 3508 | return templ_7745c5c3_Err | ||
| 3360 | } | 3509 | } | ||
| 3361 | - | var templ_7745c5c3_Var160 string | 3510 | + | var templ_7745c5c3_Var169 string |
| 3362 | - | templ_7745c5c3_Var160, templ_7745c5c3_Err = templ.JoinStringErrs(p.Existing.Label) | 3511 | + | templ_7745c5c3_Var169, templ_7745c5c3_Err = templ.JoinStringErrs(p.Existing.Label) |
| 3363 | if templ_7745c5c3_Err != nil { | 3512 | if templ_7745c5c3_Err != nil { | ||
| 3364 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 663, Col: 135} | 3513 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 686, Col: 135} |
| 3365 | } | 3514 | } | ||
| 3366 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var160)) | 3515 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var169)) |
| 3367 | if templ_7745c5c3_Err != nil { | 3516 | if templ_7745c5c3_Err != nil { | ||
| 3368 | return templ_7745c5c3_Err | 3517 | return templ_7745c5c3_Err | ||
| 3369 | } | 3518 | } | ||
| 3370 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 312, "</a></p>") | 3519 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 327, "</a></p>") |
| 3371 | if templ_7745c5c3_Err != nil { | 3520 | if templ_7745c5c3_Err != nil { | ||
| 3372 | return templ_7745c5c3_Err | 3521 | return templ_7745c5c3_Err | ||
| 3373 | } | 3522 | } | ||
| 3374 | } | 3523 | } | ||
| 3375 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 313, " ") | 3524 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 328, " ") |
| 3376 | if templ_7745c5c3_Err != nil { | 3525 | if templ_7745c5c3_Err != nil { | ||
| 3377 | return templ_7745c5c3_Err | 3526 | return templ_7745c5c3_Err | ||
| 3378 | } | 3527 | } | ||
| 3379 | if p.Create != nil { | 3528 | if p.Create != nil { | ||
| 3380 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 314, "<form class=\"cform create\" method=\"post\" action=\"") | 3529 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 329, "<form class=\"cform create\" method=\"post\" action=\"") |
| 3381 | if templ_7745c5c3_Err != nil { | 3530 | if templ_7745c5c3_Err != nil { | ||
| 3382 | return templ_7745c5c3_Err | 3531 | return templ_7745c5c3_Err | ||
| 3383 | } | 3532 | } | ||
| 3384 | - | var templ_7745c5c3_Var161 templ.SafeURL | 3533 | + | var templ_7745c5c3_Var170 templ.SafeURL |
| 3385 | - | templ_7745c5c3_Var161, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Create.Action)) | 3534 | + | templ_7745c5c3_Var170, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Create.Action)) |
| 3386 | if templ_7745c5c3_Err != nil { | 3535 | if templ_7745c5c3_Err != nil { | ||
| 3387 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 666, Col: 83} | 3536 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 689, Col: 83} |
| 3388 | } | 3537 | } | ||
| 3389 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var161)) | 3538 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var170)) |
| 3390 | if templ_7745c5c3_Err != nil { | 3539 | if templ_7745c5c3_Err != nil { | ||
| 3391 | return templ_7745c5c3_Err | 3540 | return templ_7745c5c3_Err | ||
| 3392 | } | 3541 | } | ||
| 3393 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 315, "\"><input type=\"hidden\" name=\"source\" value=\"") | 3542 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 330, "\"><input type=\"hidden\" name=\"source\" value=\"") |
| 3394 | if templ_7745c5c3_Err != nil { | 3543 | if templ_7745c5c3_Err != nil { | ||
| 3395 | return templ_7745c5c3_Err | 3544 | return templ_7745c5c3_Err | ||
| 3396 | } | 3545 | } | ||
| 3397 | - | var templ_7745c5c3_Var162 string | 3546 | + | var templ_7745c5c3_Var171 string |
| 3398 | - | templ_7745c5c3_Var162, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Source) | 3547 | + | templ_7745c5c3_Var171, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Source) |
| 3399 | if templ_7745c5c3_Err != nil { | 3548 | if templ_7745c5c3_Err != nil { | ||
| 3400 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 667, Col: 62} | 3549 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 690, Col: 62} |
| 3401 | } | 3550 | } | ||
| 3402 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var162) | 3551 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var171) |
| 3403 | if templ_7745c5c3_Err != nil { | 3552 | if templ_7745c5c3_Err != nil { | ||
| 3404 | return templ_7745c5c3_Err | 3553 | return templ_7745c5c3_Err | ||
| 3405 | } | 3554 | } | ||
| 3406 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 316, "\"> <input type=\"hidden\" name=\"target\" value=\"") | 3555 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 331, "\"> <input type=\"hidden\" name=\"target\" value=\"") |
| 3407 | if templ_7745c5c3_Err != nil { | 3556 | if templ_7745c5c3_Err != nil { | ||
| 3408 | return templ_7745c5c3_Err | 3557 | return templ_7745c5c3_Err | ||
| 3409 | } | 3558 | } | ||
| 3410 | - | var templ_7745c5c3_Var163 string | 3559 | + | var templ_7745c5c3_Var172 string |
| 3411 | - | templ_7745c5c3_Var163, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Target) | 3560 | + | templ_7745c5c3_Var172, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Target) |
| 3412 | if templ_7745c5c3_Err != nil { | 3561 | if templ_7745c5c3_Err != nil { | ||
| 3413 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 668, Col: 62} | 3562 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 691, Col: 62} |
| 3414 | } | 3563 | } | ||
| 3415 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var163) | 3564 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var172) |
| 3416 | if templ_7745c5c3_Err != nil { | 3565 | if templ_7745c5c3_Err != nil { | ||
| 3417 | return templ_7745c5c3_Err | 3566 | return templ_7745c5c3_Err | ||
| 3418 | } | 3567 | } | ||
| 3419 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 317, "\"> <label for=\"mr-title\">title</label> <input id=\"mr-title\" name=\"title\" type=\"text\" maxlength=\"120\" required value=\"") | 3568 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 332, "\"> <label for=\"mr-title\">title</label> <input id=\"mr-title\" name=\"title\" type=\"text\" maxlength=\"120\" required value=\"") |
| 3420 | if templ_7745c5c3_Err != nil { | 3569 | if templ_7745c5c3_Err != nil { | ||
| 3421 | return templ_7745c5c3_Err | 3570 | return templ_7745c5c3_Err | ||
| 3422 | } | 3571 | } | ||
| 3423 | - | var templ_7745c5c3_Var164 string | 3572 | + | var templ_7745c5c3_Var173 string |
| 3424 | - | templ_7745c5c3_Var164, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Title) | 3573 | + | templ_7745c5c3_Var173, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Create.Title) |
| 3425 | if templ_7745c5c3_Err != nil { | 3574 | if templ_7745c5c3_Err != nil { | ||
| 3426 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 670, Col: 97} | 3575 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 693, Col: 97} |
| 3427 | } | 3576 | } | ||
| 3428 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var164) | 3577 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var173) |
| 3429 | if templ_7745c5c3_Err != nil { | 3578 | if templ_7745c5c3_Err != nil { | ||
| 3430 | return templ_7745c5c3_Err | 3579 | return templ_7745c5c3_Err | ||
| 3431 | } | 3580 | } | ||
| 3432 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 318, "\" autocomplete=\"off\"> <label for=\"mr-desc\">description</label> <textarea id=\"mr-desc\" name=\"description\" rows=\"4\" maxlength=\"8000\" placeholder=\"Markdown, optional\"></textarea><div class=\"f-btns\"><button type=\"submit\" class=\"btn primary\">Create merge request</button></div></form>") | 3581 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 333, "\" autocomplete=\"off\"> <label for=\"mr-desc\">description</label> <textarea id=\"mr-desc\" name=\"description\" rows=\"4\" maxlength=\"8000\" placeholder=\"Markdown, optional\"></textarea><div class=\"f-btns\"><button type=\"submit\" class=\"btn primary\">Create merge request</button></div></form>") |
| 3433 | if templ_7745c5c3_Err != nil { | 3582 | if templ_7745c5c3_Err != nil { | ||
| 3434 | return templ_7745c5c3_Err | 3583 | return templ_7745c5c3_Err | ||
| 3435 | } | 3584 | } | ||
| 3436 | } | 3585 | } | ||
| 3437 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 319, " ") | 3586 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 334, " ") |
| 3438 | if templ_7745c5c3_Err != nil { | 3587 | if templ_7745c5c3_Err != nil { | ||
| 3439 | return templ_7745c5c3_Err | 3588 | return templ_7745c5c3_Err | ||
| 3440 | } | 3589 | } | ||
| 3441 | if p.HasDiff { | 3590 | if p.HasDiff { | ||
| 3442 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 320, "<div class=\"diff-tools\" role=\"group\" aria-label=\"Diff view\"><span class=\"dim\">") | 3591 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 335, "<div class=\"diff-tools\" role=\"group\" aria-label=\"Diff view\"><span class=\"dim\">") |
| 3443 | if templ_7745c5c3_Err != nil { | 3592 | if templ_7745c5c3_Err != nil { | ||
| 3444 | return templ_7745c5c3_Err | 3593 | return templ_7745c5c3_Err | ||
| 3445 | } | 3594 | } | ||
| 3446 | - | var templ_7745c5c3_Var165 string | 3595 | + | var templ_7745c5c3_Var174 string |
| 3447 | - | templ_7745c5c3_Var165, templ_7745c5c3_Err = templ.JoinStringErrs(plural(p.NFiles, "file", "files")) | 3596 | + | templ_7745c5c3_Var174, templ_7745c5c3_Err = templ.JoinStringErrs(plural(p.NFiles, "file", "files")) |
| 3448 | if templ_7745c5c3_Err != nil { | 3597 | if templ_7745c5c3_Err != nil { | ||
| 3449 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 680, Col: 57} | 3598 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 703, Col: 57} |
| 3450 | } | 3599 | } | ||
| 3451 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var165)) | 3600 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var174)) |
| 3452 | if templ_7745c5c3_Err != nil { | 3601 | if templ_7745c5c3_Err != nil { | ||
| 3453 | return templ_7745c5c3_Err | 3602 | return templ_7745c5c3_Err | ||
| 3454 | } | 3603 | } | ||
| 3455 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 321, " · <span class=\"plus\">+") | 3604 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 336, " · <span class=\"plus\">+") |
| 3456 | if templ_7745c5c3_Err != nil { | 3605 | if templ_7745c5c3_Err != nil { | ||
| 3457 | return templ_7745c5c3_Err | 3606 | return templ_7745c5c3_Err | ||
| 3458 | } | 3607 | } | ||
| 3459 | - | var templ_7745c5c3_Var166 string | 3608 | + | var templ_7745c5c3_Var175 string |
| 3460 | - | templ_7745c5c3_Var166, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Adds)) | 3609 | + | templ_7745c5c3_Var175, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Adds)) |
| 3461 | if templ_7745c5c3_Err != nil { | 3610 | if templ_7745c5c3_Err != nil { | ||
| 3462 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 680, Col: 97} | 3611 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 703, Col: 97} |
| 3463 | } | 3612 | } | ||
| 3464 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var166)) | 3613 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var175)) |
| 3465 | if templ_7745c5c3_Err != nil { | 3614 | if templ_7745c5c3_Err != nil { | ||
| 3466 | return templ_7745c5c3_Err | 3615 | return templ_7745c5c3_Err | ||
| 3467 | } | 3616 | } | ||
| 3468 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 322, "</span> <span class=\"minus\">-") | 3617 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 337, "</span> <span class=\"minus\">-") |
| 3469 | if templ_7745c5c3_Err != nil { | 3618 | if templ_7745c5c3_Err != nil { | ||
| 3470 | return templ_7745c5c3_Err | 3619 | return templ_7745c5c3_Err | ||
| 3471 | } | 3620 | } | ||
| 3472 | - | var templ_7745c5c3_Var167 string | 3621 | + | var templ_7745c5c3_Var176 string |
| 3473 | - | templ_7745c5c3_Var167, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Dels)) | 3622 | + | templ_7745c5c3_Var176, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Dels)) |
| 3474 | if templ_7745c5c3_Err != nil { | 3623 | if templ_7745c5c3_Err != nil { | ||
| 3475 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 680, Col: 142} | 3624 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 703, Col: 142} |
| 3476 | } | 3625 | } | ||
| 3477 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var167)) | 3626 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var176)) |
| 3478 | if templ_7745c5c3_Err != nil { | 3627 | if templ_7745c5c3_Err != nil { | ||
| 3479 | return templ_7745c5c3_Err | 3628 | return templ_7745c5c3_Err | ||
| 3480 | } | 3629 | } | ||
| 3481 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 323, "</span></span> <span class=\"grow\"></span>") | 3630 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 338, "</span></span> <span class=\"grow\"></span>") |
| 3482 | if templ_7745c5c3_Err != nil { | 3631 | if templ_7745c5c3_Err != nil { | ||
| 3483 | return templ_7745c5c3_Err | 3632 | return templ_7745c5c3_Err | ||
| 3484 | } | 3633 | } | ||
| @@ -3486,64 +3635,64 @@ func Compare(l Layout, p ComparePage) templ.Component { | |||||
| 3486 | if templ_7745c5c3_Err != nil { | 3635 | if templ_7745c5c3_Err != nil { | ||
| 3487 | return templ_7745c5c3_Err | 3636 | return templ_7745c5c3_Err | ||
| 3488 | } | 3637 | } | ||
| 3489 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 324, "</div>") | 3638 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 339, "</div>") |
| 3490 | if templ_7745c5c3_Err != nil { | 3639 | if templ_7745c5c3_Err != nil { | ||
| 3491 | return templ_7745c5c3_Err | 3640 | return templ_7745c5c3_Err | ||
| 3492 | } | 3641 | } | ||
| 3493 | if p.Invisible { | 3642 | if p.Invisible { | ||
| 3494 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 325, "<p class=\"notice\">this diff holds invisible characters (direction controls, zero-width characters). They are shown as <span class=\"inv\"><U+XXXX></span> markers, never applied.</p>") | 3643 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 340, "<p class=\"notice\">this diff holds invisible characters (direction controls, zero-width characters). They are shown as <span class=\"inv\"><U+XXXX></span> markers, never applied.</p>") |
| 3495 | if templ_7745c5c3_Err != nil { | 3644 | if templ_7745c5c3_Err != nil { | ||
| 3496 | return templ_7745c5c3_Err | 3645 | return templ_7745c5c3_Err | ||
| 3497 | } | 3646 | } | ||
| 3498 | } | 3647 | } | ||
| 3499 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 326, " <div id=\"diffs\"") | 3648 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 341, " <div id=\"diffs\"") |
| 3500 | if templ_7745c5c3_Err != nil { | 3649 | if templ_7745c5c3_Err != nil { | ||
| 3501 | return templ_7745c5c3_Err | 3650 | return templ_7745c5c3_Err | ||
| 3502 | } | 3651 | } | ||
| 3503 | if p.Both { | 3652 | if p.Both { | ||
| 3504 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 327, " data-diff=\"") | 3653 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 342, " data-diff=\"") |
| 3505 | if templ_7745c5c3_Err != nil { | 3654 | if templ_7745c5c3_Err != nil { | ||
| 3506 | return templ_7745c5c3_Err | 3655 | return templ_7745c5c3_Err | ||
| 3507 | } | 3656 | } | ||
| 3508 | - | var templ_7745c5c3_Var168 string | 3657 | + | var templ_7745c5c3_Var177 string |
| 3509 | - | templ_7745c5c3_Var168, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.View) | 3658 | + | templ_7745c5c3_Var177, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.View) |
| 3510 | if templ_7745c5c3_Err != nil { | 3659 | if templ_7745c5c3_Err != nil { | ||
| 3511 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 693, Col: 23} | 3660 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 716, Col: 23} |
| 3512 | } | 3661 | } | ||
| 3513 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var168) | 3662 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var177) |
| 3514 | if templ_7745c5c3_Err != nil { | 3663 | if templ_7745c5c3_Err != nil { | ||
| 3515 | return templ_7745c5c3_Err | 3664 | return templ_7745c5c3_Err | ||
| 3516 | } | 3665 | } | ||
| 3517 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 328, "\"") | 3666 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 343, "\"") |
| 3518 | if templ_7745c5c3_Err != nil { | 3667 | if templ_7745c5c3_Err != nil { | ||
| 3519 | return templ_7745c5c3_Err | 3668 | return templ_7745c5c3_Err | ||
| 3520 | } | 3669 | } | ||
| 3521 | } else { | 3670 | } else { | ||
| 3522 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 329, " data-view=\"") | 3671 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 344, " data-view=\"") |
| 3523 | if templ_7745c5c3_Err != nil { | 3672 | if templ_7745c5c3_Err != nil { | ||
| 3524 | return templ_7745c5c3_Err | 3673 | return templ_7745c5c3_Err | ||
| 3525 | } | 3674 | } | ||
| 3526 | - | var templ_7745c5c3_Var169 string | 3675 | + | var templ_7745c5c3_Var178 string |
| 3527 | - | templ_7745c5c3_Var169, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.View) | 3676 | + | templ_7745c5c3_Var178, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.View) |
| 3528 | if templ_7745c5c3_Err != nil { | 3677 | if templ_7745c5c3_Err != nil { | ||
| 3529 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 695, Col: 23} | 3678 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 718, Col: 23} |
| 3530 | } | 3679 | } | ||
| 3531 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var169) | 3680 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var178) |
| 3532 | if templ_7745c5c3_Err != nil { | 3681 | if templ_7745c5c3_Err != nil { | ||
| 3533 | return templ_7745c5c3_Err | 3682 | return templ_7745c5c3_Err | ||
| 3534 | } | 3683 | } | ||
| 3535 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 330, "\"") | 3684 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 345, "\"") |
| 3536 | if templ_7745c5c3_Err != nil { | 3685 | if templ_7745c5c3_Err != nil { | ||
| 3537 | return templ_7745c5c3_Err | 3686 | return templ_7745c5c3_Err | ||
| 3538 | } | 3687 | } | ||
| 3539 | } | 3688 | } | ||
| 3540 | if p.Both && !p.Pinned { | 3689 | if p.Both && !p.Pinned { | ||
| 3541 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 331, " hx-live=\"this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff\"") | 3690 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 346, " hx-live=\"this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff\"") |
| 3542 | if templ_7745c5c3_Err != nil { | 3691 | if templ_7745c5c3_Err != nil { | ||
| 3543 | return templ_7745c5c3_Err | 3692 | return templ_7745c5c3_Err | ||
| 3544 | } | 3693 | } | ||
| 3545 | } | 3694 | } | ||
| 3546 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 332, ">") | 3695 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 347, ">") |
| 3547 | if templ_7745c5c3_Err != nil { | 3696 | if templ_7745c5c3_Err != nil { | ||
| 3548 | return templ_7745c5c3_Err | 3697 | return templ_7745c5c3_Err | ||
| 3549 | } | 3698 | } | ||
| @@ -3553,14 +3702,14 @@ func Compare(l Layout, p ComparePage) templ.Component { | |||||
| 3553 | return templ_7745c5c3_Err | 3702 | return templ_7745c5c3_Err | ||
| 3554 | } | 3703 | } | ||
| 3555 | } | 3704 | } | ||
| 3556 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 333, "</div>") | 3705 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 348, "</div>") |
| 3557 | if templ_7745c5c3_Err != nil { | 3706 | if templ_7745c5c3_Err != nil { | ||
| 3558 | return templ_7745c5c3_Err | 3707 | return templ_7745c5c3_Err | ||
| 3559 | } | 3708 | } | ||
| 3560 | } | 3709 | } | ||
| 3561 | return nil | 3710 | return nil | ||
| 3562 | }) | 3711 | }) | ||
| 3563 | - | templ_7745c5c3_Err = Shell(l, compareRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var150), templ_7745c5c3_Buffer) | 3712 | + | templ_7745c5c3_Err = Shell(l, compareRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var159), templ_7745c5c3_Buffer) |
| 3564 | if templ_7745c5c3_Err != nil { | 3713 | if templ_7745c5c3_Err != nil { | ||
| 3565 | return templ_7745c5c3_Err | 3714 | return templ_7745c5c3_Err | ||
| 3566 | } | 3715 | } | ||
| @@ -3584,173 +3733,173 @@ func compareRail(p ComparePage) templ.Component { | |||||
| 3584 | }() | 3733 | }() | ||
| 3585 | } | 3734 | } | ||
| 3586 | ctx = templ.InitializeContext(ctx) | 3735 | ctx = templ.InitializeContext(ctx) | ||
| 3587 | - | templ_7745c5c3_Var170 := templ.GetChildren(ctx) | 3736 | + | templ_7745c5c3_Var179 := templ.GetChildren(ctx) |
| 3588 | - | if templ_7745c5c3_Var170 == nil { | 3737 | + | if templ_7745c5c3_Var179 == nil { |
| 3589 | - | templ_7745c5c3_Var170 = templ.NopComponent | 3738 | + | templ_7745c5c3_Var179 = templ.NopComponent |
| 3590 | } | 3739 | } | ||
| 3591 | ctx = templ.ClearChildren(ctx) | 3740 | ctx = templ.ClearChildren(ctx) | ||
| 3592 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 334, "<section aria-labelledby=\"r-ahead\"><h2 id=\"r-ahead\">Commits <span class=\"count\">") | 3741 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 349, "<section aria-labelledby=\"r-ahead\"><h2 id=\"r-ahead\">Commits <span class=\"count\">") |
| 3593 | if templ_7745c5c3_Err != nil { | 3742 | if templ_7745c5c3_Err != nil { | ||
| 3594 | return templ_7745c5c3_Err | 3743 | return templ_7745c5c3_Err | ||
| 3595 | } | 3744 | } | ||
| 3596 | - | var templ_7745c5c3_Var171 string | 3745 | + | var templ_7745c5c3_Var180 string |
| 3597 | - | templ_7745c5c3_Var171, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Ahead))) | 3746 | + | templ_7745c5c3_Var180, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Ahead))) |
| 3598 | if templ_7745c5c3_Err != nil { | 3747 | if templ_7745c5c3_Err != nil { | ||
| 3599 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 711, Col: 67} | 3748 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 734, Col: 67} |
| 3600 | } | 3749 | } | ||
| 3601 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var171)) | 3750 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var180)) |
| 3602 | if templ_7745c5c3_Err != nil { | 3751 | if templ_7745c5c3_Err != nil { | ||
| 3603 | return templ_7745c5c3_Err | 3752 | return templ_7745c5c3_Err | ||
| 3604 | } | 3753 | } | ||
| 3605 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 335, "</span></h2><ul class=\"pcommits\">") | 3754 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 350, "</span></h2><ul class=\"pcommits\">") |
| 3606 | if templ_7745c5c3_Err != nil { | 3755 | if templ_7745c5c3_Err != nil { | ||
| 3607 | return templ_7745c5c3_Err | 3756 | return templ_7745c5c3_Err | ||
| 3608 | } | 3757 | } | ||
| 3609 | for _, c := range p.Ahead { | 3758 | for _, c := range p.Ahead { | ||
| 3610 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 336, "<li><a href=\"") | 3759 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 351, "<li><a href=\"") |
| 3611 | if templ_7745c5c3_Err != nil { | 3760 | if templ_7745c5c3_Err != nil { | ||
| 3612 | return templ_7745c5c3_Err | 3761 | return templ_7745c5c3_Err | ||
| 3613 | } | 3762 | } | ||
| 3614 | - | var templ_7745c5c3_Var172 templ.SafeURL | 3763 | + | var templ_7745c5c3_Var181 templ.SafeURL |
| 3615 | - | templ_7745c5c3_Var172, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.CHref)) | 3764 | + | templ_7745c5c3_Var181, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.CHref)) |
| 3616 | if templ_7745c5c3_Err != nil { | 3765 | if templ_7745c5c3_Err != nil { | ||
| 3617 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 715, Col: 37} | 3766 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 738, Col: 37} |
| 3618 | } | 3767 | } | ||
| 3619 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var172)) | 3768 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var181)) |
| 3620 | if templ_7745c5c3_Err != nil { | 3769 | if templ_7745c5c3_Err != nil { | ||
| 3621 | return templ_7745c5c3_Err | 3770 | return templ_7745c5c3_Err | ||
| 3622 | } | 3771 | } | ||
| 3623 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 337, "\">") | 3772 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 352, "\">") |
| 3624 | if templ_7745c5c3_Err != nil { | 3773 | if templ_7745c5c3_Err != nil { | ||
| 3625 | return templ_7745c5c3_Err | 3774 | return templ_7745c5c3_Err | ||
| 3626 | } | 3775 | } | ||
| 3627 | - | var templ_7745c5c3_Var173 string | 3776 | + | var templ_7745c5c3_Var182 string |
| 3628 | - | templ_7745c5c3_Var173, templ_7745c5c3_Err = templ.JoinStringErrs(c.Short) | 3777 | + | templ_7745c5c3_Var182, templ_7745c5c3_Err = templ.JoinStringErrs(c.Short) |
| 3629 | if templ_7745c5c3_Err != nil { | 3778 | if templ_7745c5c3_Err != nil { | ||
| 3630 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 715, Col: 49} | 3779 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 738, Col: 49} |
| 3631 | } | 3780 | } | ||
| 3632 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var173)) | 3781 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var182)) |
| 3633 | if templ_7745c5c3_Err != nil { | 3782 | if templ_7745c5c3_Err != nil { | ||
| 3634 | return templ_7745c5c3_Err | 3783 | return templ_7745c5c3_Err | ||
| 3635 | } | 3784 | } | ||
| 3636 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 338, "</a> <span class=\"s\">") | 3785 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 353, "</a> <span class=\"s\">") |
| 3637 | if templ_7745c5c3_Err != nil { | 3786 | if templ_7745c5c3_Err != nil { | ||
| 3638 | return templ_7745c5c3_Err | 3787 | return templ_7745c5c3_Err | ||
| 3639 | } | 3788 | } | ||
| 3640 | - | var templ_7745c5c3_Var174 string | 3789 | + | var templ_7745c5c3_Var183 string |
| 3641 | - | templ_7745c5c3_Var174, templ_7745c5c3_Err = templ.JoinStringErrs(c.Subject) | 3790 | + | templ_7745c5c3_Var183, templ_7745c5c3_Err = templ.JoinStringErrs(c.Subject) |
| 3642 | if templ_7745c5c3_Err != nil { | 3791 | if templ_7745c5c3_Err != nil { | ||
| 3643 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 716, Col: 32} | 3792 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 739, Col: 32} |
| 3644 | } | 3793 | } | ||
| 3645 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var174)) | 3794 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var183)) |
| 3646 | if templ_7745c5c3_Err != nil { | 3795 | if templ_7745c5c3_Err != nil { | ||
| 3647 | return templ_7745c5c3_Err | 3796 | return templ_7745c5c3_Err | ||
| 3648 | } | 3797 | } | ||
| 3649 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 339, "</span> <span class=\"mute\">") | 3798 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 354, "</span> <span class=\"mute\">") |
| 3650 | if templ_7745c5c3_Err != nil { | 3799 | if templ_7745c5c3_Err != nil { | ||
| 3651 | return templ_7745c5c3_Err | 3800 | return templ_7745c5c3_Err | ||
| 3652 | } | 3801 | } | ||
| 3653 | - | var templ_7745c5c3_Var175 string | 3802 | + | var templ_7745c5c3_Var184 string |
| 3654 | - | templ_7745c5c3_Var175, templ_7745c5c3_Err = templ.JoinStringErrs(c.Author) | 3803 | + | templ_7745c5c3_Var184, templ_7745c5c3_Err = templ.JoinStringErrs(c.Author) |
| 3655 | if templ_7745c5c3_Err != nil { | 3804 | if templ_7745c5c3_Err != nil { | ||
| 3656 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 718, Col: 16} | 3805 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 741, Col: 16} |
| 3657 | } | 3806 | } | ||
| 3658 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var175)) | 3807 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var184)) |
| 3659 | if templ_7745c5c3_Err != nil { | 3808 | if templ_7745c5c3_Err != nil { | ||
| 3660 | return templ_7745c5c3_Err | 3809 | return templ_7745c5c3_Err | ||
| 3661 | } | 3810 | } | ||
| 3662 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 340, " ") | 3811 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 355, " ") |
| 3663 | if templ_7745c5c3_Err != nil { | 3812 | if templ_7745c5c3_Err != nil { | ||
| 3664 | return templ_7745c5c3_Err | 3813 | return templ_7745c5c3_Err | ||
| 3665 | } | 3814 | } | ||
| 3666 | if c.WhenAt != "" { | 3815 | if c.WhenAt != "" { | ||
| 3667 | - | var templ_7745c5c3_Var176 string | 3816 | + | var templ_7745c5c3_Var185 string |
| 3668 | - | templ_7745c5c3_Var176, templ_7745c5c3_Err = templ.JoinStringErrs(" · ") | 3817 | + | templ_7745c5c3_Var185, templ_7745c5c3_Err = templ.JoinStringErrs(" · ") |
| 3669 | if templ_7745c5c3_Err != nil { | 3818 | if templ_7745c5c3_Err != nil { | ||
| 3670 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 720, Col: 15} | 3819 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 743, Col: 15} |
| 3671 | } | 3820 | } | ||
| 3672 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var176)) | 3821 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var185)) |
| 3673 | if templ_7745c5c3_Err != nil { | 3822 | if templ_7745c5c3_Err != nil { | ||
| 3674 | return templ_7745c5c3_Err | 3823 | return templ_7745c5c3_Err | ||
| 3675 | } | 3824 | } | ||
| 3676 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 341, "<time datetime=\"") | 3825 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 356, "<time datetime=\"") |
| 3677 | if templ_7745c5c3_Err != nil { | 3826 | if templ_7745c5c3_Err != nil { | ||
| 3678 | return templ_7745c5c3_Err | 3827 | return templ_7745c5c3_Err | ||
| 3679 | } | 3828 | } | ||
| 3680 | - | var templ_7745c5c3_Var177 string | 3829 | + | var templ_7745c5c3_Var186 string |
| 3681 | - | templ_7745c5c3_Var177, templ_7745c5c3_Err = templ.ResolveAttributeValue(c.WhenAt) | 3830 | + | templ_7745c5c3_Var186, templ_7745c5c3_Err = templ.ResolveAttributeValue(c.WhenAt) |
| 3682 | if templ_7745c5c3_Err != nil { | 3831 | if templ_7745c5c3_Err != nil { | ||
| 3683 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 720, Col: 42} | 3832 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 743, Col: 42} |
| 3684 | } | 3833 | } | ||
| 3685 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var177) | 3834 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var186) |
| 3686 | if templ_7745c5c3_Err != nil { | 3835 | if templ_7745c5c3_Err != nil { | ||
| 3687 | return templ_7745c5c3_Err | 3836 | return templ_7745c5c3_Err | ||
| 3688 | } | 3837 | } | ||
| 3689 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 342, "\">") | 3838 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 357, "\">") |
| 3690 | if templ_7745c5c3_Err != nil { | 3839 | if templ_7745c5c3_Err != nil { | ||
| 3691 | return templ_7745c5c3_Err | 3840 | return templ_7745c5c3_Err | ||
| 3692 | } | 3841 | } | ||
| 3693 | - | var templ_7745c5c3_Var178 string | 3842 | + | var templ_7745c5c3_Var187 string |
| 3694 | - | templ_7745c5c3_Var178, templ_7745c5c3_Err = templ.JoinStringErrs(c.When) | 3843 | + | templ_7745c5c3_Var187, templ_7745c5c3_Err = templ.JoinStringErrs(c.When) |
| 3695 | if templ_7745c5c3_Err != nil { | 3844 | if templ_7745c5c3_Err != nil { | ||
| 3696 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 720, Col: 53} | 3845 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 743, Col: 53} |
| 3697 | } | 3846 | } | ||
| 3698 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var178)) | 3847 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var187)) |
| 3699 | if templ_7745c5c3_Err != nil { | 3848 | if templ_7745c5c3_Err != nil { | ||
| 3700 | return templ_7745c5c3_Err | 3849 | return templ_7745c5c3_Err | ||
| 3701 | } | 3850 | } | ||
| 3702 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 343, "</time>") | 3851 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 358, "</time>") |
| 3703 | if templ_7745c5c3_Err != nil { | 3852 | if templ_7745c5c3_Err != nil { | ||
| 3704 | return templ_7745c5c3_Err | 3853 | return templ_7745c5c3_Err | ||
| 3705 | } | 3854 | } | ||
| 3706 | } | 3855 | } | ||
| 3707 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 344, "</span></li>") | 3856 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 359, "</span></li>") |
| 3708 | if templ_7745c5c3_Err != nil { | 3857 | if templ_7745c5c3_Err != nil { | ||
| 3709 | return templ_7745c5c3_Err | 3858 | return templ_7745c5c3_Err | ||
| 3710 | } | 3859 | } | ||
| 3711 | } | 3860 | } | ||
| 3712 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 345, "</ul>") | 3861 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 360, "</ul>") |
| 3713 | if templ_7745c5c3_Err != nil { | 3862 | if templ_7745c5c3_Err != nil { | ||
| 3714 | return templ_7745c5c3_Err | 3863 | return templ_7745c5c3_Err | ||
| 3715 | } | 3864 | } | ||
| 3716 | if len(p.Ahead) == 0 { | 3865 | if len(p.Ahead) == 0 { | ||
| 3717 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 346, "<p class=\"dim\">no commit ahead of ") | 3866 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 361, "<p class=\"dim\">no commit ahead of ") |
| 3718 | if templ_7745c5c3_Err != nil { | 3867 | if templ_7745c5c3_Err != nil { | ||
| 3719 | return templ_7745c5c3_Err | 3868 | return templ_7745c5c3_Err | ||
| 3720 | } | 3869 | } | ||
| 3721 | - | var templ_7745c5c3_Var179 string | 3870 | + | var templ_7745c5c3_Var188 string |
| 3722 | - | templ_7745c5c3_Var179, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) | 3871 | + | templ_7745c5c3_Var188, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target) |
| 3723 | if templ_7745c5c3_Err != nil { | 3872 | if templ_7745c5c3_Err != nil { | ||
| 3724 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 727, Col: 47} | 3873 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 750, Col: 47} |
| 3725 | } | 3874 | } | ||
| 3726 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var179)) | 3875 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var188)) |
| 3727 | if templ_7745c5c3_Err != nil { | 3876 | if templ_7745c5c3_Err != nil { | ||
| 3728 | return templ_7745c5c3_Err | 3877 | return templ_7745c5c3_Err | ||
| 3729 | } | 3878 | } | ||
| 3730 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 347, ".</p>") | 3879 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 362, ".</p>") |
| 3731 | if templ_7745c5c3_Err != nil { | 3880 | if templ_7745c5c3_Err != nil { | ||
| 3732 | return templ_7745c5c3_Err | 3881 | return templ_7745c5c3_Err | ||
| 3733 | } | 3882 | } | ||
| 3734 | } | 3883 | } | ||
| 3735 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 348, "</section>") | 3884 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 363, "</section>") |
| 3736 | if templ_7745c5c3_Err != nil { | 3885 | if templ_7745c5c3_Err != nil { | ||
| 3737 | return templ_7745c5c3_Err | 3886 | return templ_7745c5c3_Err | ||
| 3738 | } | 3887 | } | ||
| 3739 | if p.HasDiff { | 3888 | if p.HasDiff { | ||
| 3740 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 349, "<section aria-labelledby=\"r-files\"><h2 id=\"r-files\">Files <span class=\"count\">") | 3889 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 364, "<section aria-labelledby=\"r-files\"><h2 id=\"r-files\">Files <span class=\"count\">") |
| 3741 | if templ_7745c5c3_Err != nil { | 3890 | if templ_7745c5c3_Err != nil { | ||
| 3742 | return templ_7745c5c3_Err | 3891 | return templ_7745c5c3_Err | ||
| 3743 | } | 3892 | } | ||
| 3744 | - | var templ_7745c5c3_Var180 string | 3893 | + | var templ_7745c5c3_Var189 string |
| 3745 | - | templ_7745c5c3_Var180, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Files))) | 3894 | + | templ_7745c5c3_Var189, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Files))) |
| 3746 | if templ_7745c5c3_Err != nil { | 3895 | if templ_7745c5c3_Err != nil { | ||
| 3747 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 732, Col: 66} | 3896 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/mr.templ`, Line: 755, Col: 66} |
| 3748 | } | 3897 | } | ||
| 3749 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var180)) | 3898 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var189)) |
| 3750 | if templ_7745c5c3_Err != nil { | 3899 | if templ_7745c5c3_Err != nil { | ||
| 3751 | return templ_7745c5c3_Err | 3900 | return templ_7745c5c3_Err | ||
| 3752 | } | 3901 | } | ||
| 3753 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 350, "</span></h2>") | 3902 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 365, "</span></h2>") |
| 3754 | if templ_7745c5c3_Err != nil { | 3903 | if templ_7745c5c3_Err != nil { | ||
| 3755 | return templ_7745c5c3_Err | 3904 | return templ_7745c5c3_Err | ||
| 3756 | } | 3905 | } | ||
| @@ -3758,12 +3907,12 @@ func compareRail(p ComparePage) templ.Component { | |||||
| 3758 | if templ_7745c5c3_Err != nil { | 3907 | if templ_7745c5c3_Err != nil { | ||
| 3759 | return templ_7745c5c3_Err | 3908 | return templ_7745c5c3_Err | ||
| 3760 | } | 3909 | } | ||
| 3761 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 351, "</section>") | 3910 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 366, "</section>") |
| 3762 | if templ_7745c5c3_Err != nil { | 3911 | if templ_7745c5c3_Err != nil { | ||
| 3763 | return templ_7745c5c3_Err | 3912 | return templ_7745c5c3_Err | ||
| 3764 | } | 3913 | } | ||
| 3765 | } | 3914 | } | ||
| 3766 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 352, "<section aria-labelledby=\"r-cli\"><h2 id=\"r-cli\">From a terminal</h2>") | 3915 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 367, "<section aria-labelledby=\"r-cli\"><h2 id=\"r-cli\">From a terminal</h2>") |
| 3767 | if templ_7745c5c3_Err != nil { | 3916 | if templ_7745c5c3_Err != nil { | ||
| 3768 | return templ_7745c5c3_Err | 3917 | return templ_7745c5c3_Err | ||
| 3769 | } | 3918 | } | ||
| @@ -3771,7 +3920,7 @@ func compareRail(p ComparePage) templ.Component { | |||||
| 3771 | if templ_7745c5c3_Err != nil { | 3920 | if templ_7745c5c3_Err != nil { | ||
| 3772 | return templ_7745c5c3_Err | 3921 | return templ_7745c5c3_Err | ||
| 3773 | } | 3922 | } | ||
| 3774 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 353, "</section>") | 3923 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 368, "</section>") |
| 3775 | if templ_7745c5c3_Err != nil { | 3924 | if templ_7745c5c3_Err != nil { | ||
| 3776 | return templ_7745c5c3_Err | 3925 | return templ_7745c5c3_Err | ||
| 3777 | } | 3926 | } | ||
M internal/adapters/web/mr_test.go +83 -0
| @@ -4,6 +4,9 @@ package web | |||
| 4 | 4 | ||
| 5 | 5 | import ( | |
| 6 | 6 | "context" | |
| 7 | + | "net/http" | |
| 8 | + | "net/http/httptest" | |
| 9 | + | "strings" | |
| 7 | 10 | "testing" | |
| 8 | 11 | "time" | |
| 9 | 12 | ||
| @@ -195,3 +198,83 @@ func TestMRReadPresentationCommitCount(t *testing.T) { | |||
| 195 | 198 | }) | |
| 196 | 199 | } | |
| 197 | 200 | } | |
| 201 | + | ||
| 202 | + | func TestMergeBoxAutoMerge(t *testing.T) { | |
| 203 | + | t.Parallel() | |
| 204 | + | mg := mergeabilityView(domain.Mergeability{State: domain.MergeabilityUpToDate}, "main") | |
| 205 | + | mk := func(allow bool, runs ports.RunService) *MergeBox { | |
| 206 | + | v := repoWithModes(domain.MergeModes()...) | |
| 207 | + | v.Settings.AllowAutoMerge = allow | |
| 208 | + | return (&Server{cfg: Config{Runs: runs}}).mergeBox(&repoData{repo: v}, 1, "feat", "abc", false, mg) | |
| 209 | + | } | |
| 210 | + | assert.False(t, mk(false, mocks.NewRunService(t)).CanAutoMerge) | |
| 211 | + | assert.False(t, mk(true, nil).CanAutoMerge, "no CI, nothing to wait for") | |
| 212 | + | on := mk(true, mocks.NewRunService(t)) | |
| 213 | + | assert.True(t, on.CanAutoMerge) | |
| 214 | + | ||
| 215 | + | page := MRPage{Target: "main", Box: on} | |
| 216 | + | html := renderToString(t, mergeMenu(page)) | |
| 217 | + | assert.Contains(t, html, "Merge when ready") | |
| 218 | + | assert.Contains(t, html, `formaction="`+on.AutoAction+`"`) | |
| 219 | + | assert.NotContains(t, html, "Cancel auto-merge") | |
| 220 | + | page.Box = mk(false, mocks.NewRunService(t)) | |
| 221 | + | assert.NotContains(t, renderToString(t, mergeMenu(page)), "Merge when ready") | |
| 222 | + | ||
| 223 | + | on.AutoMerge = &AutoMergeView{Mode: "squash", EnabledBy: "owner", HeadShort: "abc"} | |
| 224 | + | html = renderToString(t, mergeMenu(MRPage{Target: "main", Box: on})) | |
| 225 | + | assert.Contains(t, html, "Auto-merge: squash when ready, enabled by owner") | |
| 226 | + | assert.Contains(t, html, `action="`+on.CancelAutoAction+`"`) | |
| 227 | + | assert.Contains(t, html, "Cancel auto-merge") | |
| 228 | + | } | |
| 229 | + | ||
| 230 | + | func autoMergeRequest(path, body string) *http.Request { | |
| 231 | + | r := httptest.NewRequest(http.MethodPost, path, strings.NewReader(body)) | |
| 232 | + | r.Header.Set("Content-Type", "application/x-www-form-urlencoded") | |
| 233 | + | r.SetPathValue("repo", "demo") | |
| 234 | + | r.SetPathValue("n", "3") | |
| 235 | + | return r | |
| 236 | + | } | |
| 237 | + | ||
| 238 | + | func TestAutoMergeHandlers(t *testing.T) { | |
| 239 | + | t.Parallel() | |
| 240 | + | name, err := domain.ParseRepoName("demo") | |
| 241 | + | require.NoError(t, err) | |
| 242 | + | ctx := context.Background() | |
| 243 | + | ||
| 244 | + | svc := mocks.NewMergeRequestService(t) | |
| 245 | + | svc.EXPECT().EnableAutoMerge(mock.Anything, mock.Anything, name, int64(3), ports.EnableAutoMergeParams{Mode: domain.MergeModeSquash}). | |
| 246 | + | Return(domain.MergeRequest{}, nil).Once() | |
| 247 | + | svc.EXPECT().CancelAutoMerge(mock.Anything, mock.Anything, name, int64(3)).Return(domain.MergeRequest{}, nil).Once() | |
| 248 | + | s := &Server{cfg: Config{MergeRequests: svc}} | |
| 249 | + | to, _, err := s.mrAutoMerge(ctx, autoMergeRequest("/demo/merge-requests/3/auto-merge", "mode=squash")) | |
| 250 | + | require.NoError(t, err) | |
| 251 | + | assert.Equal(t, mrHref("demo", 3), to) | |
| 252 | + | to, _, err = s.mrCancelAutoMerge(ctx, autoMergeRequest("/demo/merge-requests/3/auto-merge/cancel", "")) | |
| 253 | + | require.NoError(t, err) | |
| 254 | + | assert.Equal(t, mrHref("demo", 3), to) | |
| 255 | + | ||
| 256 | + | // A bad mode is refused before the service. | |
| 257 | + | _, _, err = s.mrAutoMerge(ctx, autoMergeRequest("/x", "mode=rebase")) | |
| 258 | + | var re *rerender | |
| 259 | + | require.ErrorAs(t, err, &re) | |
| 260 | + | assert.Equal(t, http.StatusBadRequest, re.status) | |
| 261 | + | ||
| 262 | + | // A refusal of the use case is shown in the box, like a refused merge. | |
| 263 | + | svc2 := mocks.NewMergeRequestService(t) | |
| 264 | + | svc2.EXPECT().EnableAutoMerge(mock.Anything, mock.Anything, name, int64(3), mock.Anything). | |
| 265 | + | Return(domain.MergeRequest{}, domain.ErrPreconditionFailed).Once() | |
| 266 | + | svc2.EXPECT().CancelAutoMerge(mock.Anything, mock.Anything, name, int64(3)). | |
| 267 | + | Return(domain.MergeRequest{}, domain.ErrNotFound).Once() | |
| 268 | + | s2 := &Server{cfg: Config{MergeRequests: svc2}} | |
| 269 | + | _, _, err = s2.mrAutoMerge(ctx, autoMergeRequest("/x", "mode=squash")) | |
| 270 | + | require.ErrorAs(t, err, &re) | |
| 271 | + | assert.Equal(t, http.StatusConflict, re.status) | |
| 272 | + | _, _, err = s2.mrCancelAutoMerge(ctx, autoMergeRequest("/x", "")) | |
| 273 | + | require.ErrorIs(t, err, domain.ErrNotFound) | |
| 274 | + | } | |
| 275 | + | ||
| 276 | + | func TestAutoMergeLiveEvents(t *testing.T) { | |
| 277 | + | t.Parallel() | |
| 278 | + | assert.True(t, liveEvent(watchOf(domain.MergeRequestAutoMergeEnabled{}))) | |
| 279 | + | assert.True(t, liveEvent(watchOf(domain.MergeRequestAutoMergeCancelled{}))) | |
| 280 | + | } | |
| @@ -4,6 +4,9 @@ package web | |||||
| 4 | 4 | ||||
| 5 | import ( | 5 | import ( | ||
| 6 | "context" | 6 | "context" | ||
| 7 | + | "net/http" | |||
| 8 | + | "net/http/httptest" | |||
| 9 | + | "strings" | |||
| 7 | "testing" | 10 | "testing" | ||
| 8 | "time" | 11 | "time" | ||
| 9 | 12 | ||||
| @@ -195,3 +198,83 @@ func TestMRReadPresentationCommitCount(t *testing.T) { | |||||
| 195 | }) | 198 | }) | ||
| 196 | } | 199 | } | ||
| 197 | } | 200 | } | ||
| 201 | + | ||||
| 202 | + | func TestMergeBoxAutoMerge(t *testing.T) { | |||
| 203 | + | t.Parallel() | |||
| 204 | + | mg := mergeabilityView(domain.Mergeability{State: domain.MergeabilityUpToDate}, "main") | |||
| 205 | + | mk := func(allow bool, runs ports.RunService) *MergeBox { | |||
| 206 | + | v := repoWithModes(domain.MergeModes()...) | |||
| 207 | + | v.Settings.AllowAutoMerge = allow | |||
| 208 | + | return (&Server{cfg: Config{Runs: runs}}).mergeBox(&repoData{repo: v}, 1, "feat", "abc", false, mg) | |||
| 209 | + | } | |||
| 210 | + | assert.False(t, mk(false, mocks.NewRunService(t)).CanAutoMerge) | |||
| 211 | + | assert.False(t, mk(true, nil).CanAutoMerge, "no CI, nothing to wait for") | |||
| 212 | + | on := mk(true, mocks.NewRunService(t)) | |||
| 213 | + | assert.True(t, on.CanAutoMerge) | |||
| 214 | + | ||||
| 215 | + | page := MRPage{Target: "main", Box: on} | |||
| 216 | + | html := renderToString(t, mergeMenu(page)) | |||
| 217 | + | assert.Contains(t, html, "Merge when ready") | |||
| 218 | + | assert.Contains(t, html, `formaction="`+on.AutoAction+`"`) | |||
| 219 | + | assert.NotContains(t, html, "Cancel auto-merge") | |||
| 220 | + | page.Box = mk(false, mocks.NewRunService(t)) | |||
| 221 | + | assert.NotContains(t, renderToString(t, mergeMenu(page)), "Merge when ready") | |||
| 222 | + | ||||
| 223 | + | on.AutoMerge = &AutoMergeView{Mode: "squash", EnabledBy: "owner", HeadShort: "abc"} | |||
| 224 | + | html = renderToString(t, mergeMenu(MRPage{Target: "main", Box: on})) | |||
| 225 | + | assert.Contains(t, html, "Auto-merge: squash when ready, enabled by owner") | |||
| 226 | + | assert.Contains(t, html, `action="`+on.CancelAutoAction+`"`) | |||
| 227 | + | assert.Contains(t, html, "Cancel auto-merge") | |||
| 228 | + | } | |||
| 229 | + | ||||
| 230 | + | func autoMergeRequest(path, body string) *http.Request { | |||
| 231 | + | r := httptest.NewRequest(http.MethodPost, path, strings.NewReader(body)) | |||
| 232 | + | r.Header.Set("Content-Type", "application/x-www-form-urlencoded") | |||
| 233 | + | r.SetPathValue("repo", "demo") | |||
| 234 | + | r.SetPathValue("n", "3") | |||
| 235 | + | return r | |||
| 236 | + | } | |||
| 237 | + | ||||
| 238 | + | func TestAutoMergeHandlers(t *testing.T) { | |||
| 239 | + | t.Parallel() | |||
| 240 | + | name, err := domain.ParseRepoName("demo") | |||
| 241 | + | require.NoError(t, err) | |||
| 242 | + | ctx := context.Background() | |||
| 243 | + | ||||
| 244 | + | svc := mocks.NewMergeRequestService(t) | |||
| 245 | + | svc.EXPECT().EnableAutoMerge(mock.Anything, mock.Anything, name, int64(3), ports.EnableAutoMergeParams{Mode: domain.MergeModeSquash}). | |||
| 246 | + | Return(domain.MergeRequest{}, nil).Once() | |||
| 247 | + | svc.EXPECT().CancelAutoMerge(mock.Anything, mock.Anything, name, int64(3)).Return(domain.MergeRequest{}, nil).Once() | |||
| 248 | + | s := &Server{cfg: Config{MergeRequests: svc}} | |||
| 249 | + | to, _, err := s.mrAutoMerge(ctx, autoMergeRequest("/demo/merge-requests/3/auto-merge", "mode=squash")) | |||
| 250 | + | require.NoError(t, err) | |||
| 251 | + | assert.Equal(t, mrHref("demo", 3), to) | |||
| 252 | + | to, _, err = s.mrCancelAutoMerge(ctx, autoMergeRequest("/demo/merge-requests/3/auto-merge/cancel", "")) | |||
| 253 | + | require.NoError(t, err) | |||
| 254 | + | assert.Equal(t, mrHref("demo", 3), to) | |||
| 255 | + | ||||
| 256 | + | // A bad mode is refused before the service. | |||
| 257 | + | _, _, err = s.mrAutoMerge(ctx, autoMergeRequest("/x", "mode=rebase")) | |||
| 258 | + | var re *rerender | |||
| 259 | + | require.ErrorAs(t, err, &re) | |||
| 260 | + | assert.Equal(t, http.StatusBadRequest, re.status) | |||
| 261 | + | ||||
| 262 | + | // A refusal of the use case is shown in the box, like a refused merge. | |||
| 263 | + | svc2 := mocks.NewMergeRequestService(t) | |||
| 264 | + | svc2.EXPECT().EnableAutoMerge(mock.Anything, mock.Anything, name, int64(3), mock.Anything). | |||
| 265 | + | Return(domain.MergeRequest{}, domain.ErrPreconditionFailed).Once() | |||
| 266 | + | svc2.EXPECT().CancelAutoMerge(mock.Anything, mock.Anything, name, int64(3)). | |||
| 267 | + | Return(domain.MergeRequest{}, domain.ErrNotFound).Once() | |||
| 268 | + | s2 := &Server{cfg: Config{MergeRequests: svc2}} | |||
| 269 | + | _, _, err = s2.mrAutoMerge(ctx, autoMergeRequest("/x", "mode=squash")) | |||
| 270 | + | require.ErrorAs(t, err, &re) | |||
| 271 | + | assert.Equal(t, http.StatusConflict, re.status) | |||
| 272 | + | _, _, err = s2.mrCancelAutoMerge(ctx, autoMergeRequest("/x", "")) | |||
| 273 | + | require.ErrorIs(t, err, domain.ErrNotFound) | |||
| 274 | + | } | |||
| 275 | + | ||||
| 276 | + | func TestAutoMergeLiveEvents(t *testing.T) { | |||
| 277 | + | t.Parallel() | |||
| 278 | + | assert.True(t, liveEvent(watchOf(domain.MergeRequestAutoMergeEnabled{}))) | |||
| 279 | + | assert.True(t, liveEvent(watchOf(domain.MergeRequestAutoMergeCancelled{}))) | |||
| 280 | + | } | |||
M internal/adapters/web/web.go +2 -0
| @@ -231,6 +231,8 @@ func (s *Server) routes() *http.ServeMux { | |||
| 231 | 231 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/comments/{id}/edit", s.mrAction(s.mrEditComment)) | |
| 232 | 232 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/comments/{id}/delete", s.mrAction(s.mrDeleteComment)) | |
| 233 | 233 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/merge", s.mrAction(s.mrMerge)) | |
| 234 | + | mux.HandleFunc("POST /{repo}/merge-requests/{n}/auto-merge", s.mrAction(s.mrAutoMerge)) | |
| 235 | + | mux.HandleFunc("POST /{repo}/merge-requests/{n}/auto-merge/cancel", s.mrAction(s.mrCancelAutoMerge)) | |
| 234 | 236 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/close", s.mrAction(s.mrClose)) | |
| 235 | 237 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/ready", s.mrAction(s.mrReady)) | |
| 236 | 238 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/read", s.mrAction(s.mrRead)) | |
| @@ -231,6 +231,8 @@ func (s *Server) routes() *http.ServeMux { | |||||
| 231 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/comments/{id}/edit", s.mrAction(s.mrEditComment)) | 231 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/comments/{id}/edit", s.mrAction(s.mrEditComment)) | ||
| 232 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/comments/{id}/delete", s.mrAction(s.mrDeleteComment)) | 232 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/comments/{id}/delete", s.mrAction(s.mrDeleteComment)) | ||
| 233 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/merge", s.mrAction(s.mrMerge)) | 233 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/merge", s.mrAction(s.mrMerge)) | ||
| 234 | + | mux.HandleFunc("POST /{repo}/merge-requests/{n}/auto-merge", s.mrAction(s.mrAutoMerge)) | |||
| 235 | + | mux.HandleFunc("POST /{repo}/merge-requests/{n}/auto-merge/cancel", s.mrAction(s.mrCancelAutoMerge)) | |||
| 234 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/close", s.mrAction(s.mrClose)) | 236 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/close", s.mrAction(s.mrClose)) | ||
| 235 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/ready", s.mrAction(s.mrReady)) | 237 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/ready", s.mrAction(s.mrReady)) | ||
| 236 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/read", s.mrAction(s.mrRead)) | 238 | mux.HandleFunc("POST /{repo}/merge-requests/{n}/read", s.mrAction(s.mrRead)) | ||