Skip to content

Fixed 'DrupalExtension smoke' checkout failing for pull requests from forks. - #389

Merged
AlexSkrypnyk merged 1 commit into
masterfrom
feature/fix-fork-checkout
Jul 28, 2026
Merged

Fixed 'DrupalExtension smoke' checkout failing for pull requests from forks.#389
AlexSkrypnyk merged 1 commit into
masterfrom
feature/fix-fork-checkout

Conversation

@AlexSkrypnyk

Copy link
Copy Markdown
Collaborator

Summary

The extension job ("DrupalExtension smoke") failed on every pull request from a fork: its "Checkout DrupalDriver" step set ref: to the head branch name while leaving repository: at the base repo jhedstrom/DrupalDriver, where a fork's branch does not exist, so git fetch matched nothing and exited 1 (observed on PR #387, branch legacyDrush from fork ptmkenny/DrupalDriver). The ref: override was no longer needed: the "Add path repository for DrupalDriver" step always pins options.versions for drupal/drupal-driver, and Composer's PathRepository::initialize() only calls the version guesser - the only code path needing a branch name - when no version is set, so it never runs; the only remaining git call computes dist.reference from HEAD, which works fine on a detached HEAD. Removing ref: restores the default checkout of the PR merge ref, which lives in the base repo and resolves for forks, and brings this job in line with the lint and tests jobs, which already test the merge result.

Changes

  • .github/workflows/ci.yml: removed the ref: ${{ github.head_ref || github.ref_name }} override and its explanatory comment from the extension job's "Checkout DrupalDriver" step, leaving the step to check out actions/checkout@v6's default ref.

Before / After

BEFORE
┌───────────────────────────────────────────────────┐
│ ref: ${{ github.head_ref || github.ref_name }}    │
└───────────────────────────────────────────────────┘
                        │
                        ▼
   fork PR #387 (ptmkenny/DrupalDriver, branch legacyDrush)
                resolves ref to "legacyDrush"
                        │
                        ▼
    git fetch refs/heads/legacyDrush* from jhedstrom/DrupalDriver
                        │
                        ▼
       branch only exists in the fork, not the base repo
                        │
                        ▼
               fetch matches nothing, exit 1
                        │
                        ▼
            "DrupalExtension smoke" job FAILS

AFTER
┌───────────────────────────────────────────────────┐
│ ref: (not set, actions/checkout uses its default) │
└───────────────────────────────────────────────────┘
                        │
                        ▼
      fork PR #387 -> default ref is the PR merge ref
                        │
                        ▼
     git fetch refs/pull/387/merge from jhedstrom/DrupalDriver
                        │
                        ▼
           merge ref always lives in the base repo
                        │
                        ▼
                  checkout succeeds
                        │
                        ▼
    "DrupalExtension smoke" job RUNS, same as lint and tests

… forks.

The step set 'ref' to the head branch name while leaving 'repository' at the base repo, so a fork's branch was never found there and the fetch failed. The default checkout uses the pull request merge ref, which lives in the base repo and resolves for forks.

The 'ref' override is no longer needed: the 'Add path repository' step always pins 'options.versions' for 'drupal/drupal-driver', and Composer's 'PathRepository' only consults the version guesser when no version is set, so the branch name never reaches it.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@AlexSkrypnyk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 6 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2729208b-d107-402d-a14b-06915fae5142

📥 Commits

Reviewing files that changed from the base of the PR and between 18ae58f and a56dee5.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix-fork-checkout

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Code coverage (threshold: 95%)



Code Coverage Report Summary:
  Classes: 58.82% (20/34)
  Methods: 89.52% (222/248)
  Lines:   96.28% (1241/1289)

Per-class coverage
Drupal\Driver\Alias\CreationAliasRegistryTrait               100.00%
Drupal\Driver\Alias\RolesAlias                                87.50%
Drupal\Driver\BlackboxDriver                                 100.00%
Drupal\Driver\Core\Alias\AuthorAlias                          90.48%
Drupal\Driver\Core\Alias\ParentTermAlias                      88.24%
Drupal\Driver\Core\Alias\VocabularyMachineNameAlias           88.89%
Drupal\Driver\Core\Core                                       95.81%
Drupal\Driver\Core\Field\AbstractHandler                      95.74%
Drupal\Driver\Core\Field\AddressHandler                       94.83%
Drupal\Driver\Core\Field\BooleanHandler                      100.00%
Drupal\Driver\Core\Field\ColorFieldTypeHandler                 0.00%
Drupal\Driver\Core\Field\DateRecurHandler                    100.00%
Drupal\Driver\Core\Field\DaterangeHandler                    100.00%
Drupal\Driver\Core\Field\DatetimeHandler                     100.00%
Drupal\Driver\Core\Field\DefaultHandler                      100.00%
Drupal\Driver\Core\Field\EmbridgeAssetItemHandler              0.00%
Drupal\Driver\Core\Field\EntityReferenceHandler               94.44%
Drupal\Driver\Core\Field\EntityReferenceRevisionsHandler      86.05%
Drupal\Driver\Core\Field\FieldClassifier                      94.44%
Drupal\Driver\Core\Field\FieldShapeClassifier                100.00%
Drupal\Driver\Core\Field\FileHandler                         100.00%
Drupal\Driver\Core\Field\ImageHandler                        100.00%
Drupal\Driver\Core\Field\LinkHandler                          94.00%
Drupal\Driver\Core\Field\ListFloatHandler                    100.00%
Drupal\Driver\Core\Field\ListHandlerBase                     100.00%
Drupal\Driver\Core\Field\ListIntegerHandler                    0.00%
Drupal\Driver\Core\Field\ListStringHandler                     0.00%
Drupal\Driver\Core\Field\NameHandler                          96.36%
Drupal\Driver\Core\Field\OgStandardReferenceHandler            0.00%
Drupal\Driver\Core\Field\SmartdateHandler                    100.00%
Drupal\Driver\Core\Field\SupportedImageHandler               100.00%
Drupal\Driver\Core\Field\TextHandler                           0.00%
Drupal\Driver\Core\Field\TextLongHandler                       0.00%
Drupal\Driver\Core\Field\TextWithSummaryHandler                0.00%
Drupal\Driver\Core\Field\TimeHandler                          91.67%
Drupal\Driver\DrupalDriver                                    98.86%
Drupal\Driver\Drush\DrushResult                              100.00%
Drupal\Driver\DrushDriver                                    100.00%
Drupal\Driver\Entity\EntityStub                              100.00%
Drupal\Driver\Exception\BootstrapException                   100.00%
Drupal\Driver\Exception\CreationAliasResolutionException       0.00%
Drupal\Driver\Exception\Exception                            100.00%
Drupal\Driver\Exception\UnsupportedDriverActionException     100.00%

@AlexSkrypnyk
AlexSkrypnyk merged commit 7b65ea7 into master Jul 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant