Commit 588f3e5
fix: improve mergebot /update command with better fork handling and checkout
This commit fixes several issues with the `/update` command in the mergebot workflow:
**Problems fixed:**
1. Checkout was trying to fetch branch from base repo instead of head repo
2. Branch comparison used incorrect reference format for same-repo PRs
3. Fork validation happened too late, causing unnecessary operations
**Changes:**
- Add early exit for fork PRs in "Get PR info" step with clear error message
- Specify repository parameter in checkout action to fetch from correct repo
- Simplify branch comparison to use simple branch reference for same-repo PRs
- Update validation conditions to skip unnecessary steps for fork PRs
- Remove redundant "Handle fork PR" step (now handled earlier)
- Add better logging for debugging
**Benefits:**
- Fork PRs now get immediate, clear feedback that update is not supported
- Same-repo PRs can now be updated correctly without checkout errors
- Better performance by skipping unnecessary operations for forks
- Cleaner code flow and easier maintenance
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 66aacfc commit 588f3e5
1 file changed
+33
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
407 | 432 | | |
408 | 433 | | |
409 | 434 | | |
410 | 435 | | |
411 | 436 | | |
412 | 437 | | |
413 | 438 | | |
414 | | - | |
| 439 | + | |
415 | 440 | | |
416 | 441 | | |
417 | 442 | | |
| |||
471 | 496 | | |
472 | 497 | | |
473 | 498 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | 499 | | |
483 | 500 | | |
484 | 501 | | |
| |||
490 | 507 | | |
491 | 508 | | |
492 | 509 | | |
493 | | - | |
| 510 | + | |
494 | 511 | | |
495 | 512 | | |
496 | 513 | | |
497 | 514 | | |
498 | | - | |
| 515 | + | |
499 | 516 | | |
500 | 517 | | |
501 | 518 | | |
| |||
530 | 547 | | |
531 | 548 | | |
532 | 549 | | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | 550 | | |
556 | 551 | | |
557 | 552 | | |
558 | 553 | | |
| 554 | + | |
559 | 555 | | |
560 | 556 | | |
561 | 557 | | |
| |||
589 | 585 | | |
590 | 586 | | |
591 | 587 | | |
592 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
593 | 591 | | |
594 | 592 | | |
595 | 593 | | |
| |||
0 commit comments