Skip to content

Conversation

@elibosley
Copy link
Member

@elibosley elibosley commented Nov 27, 2025

Summary

  • ensure the PR preview workflow checks out the base repository when a pull request is closed so the cleanup step can operate within a git directory
  • retain the existing checkout for open PR events

Testing

  • npm run lint

Codex Task

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow configuration to conditionally checkout alternate branches based on PR state.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

📝 Walkthrough

Walkthrough

The PR workflow is modified to conditionally checkout different git branches based on PR action type. When a PR closes, the workflow checks out the base branch; otherwise, it checks out the PR head branch. The existing checkout step is renamed for clarity.

Changes

Cohort / File(s) Summary
Workflow conditional checkout logic
\\.github/workflows/pr.yml
Renamed existing "Checkout" step to "Checkout PR branch" in lint and deploy-preview jobs. Added new conditional "Checkout base branch" step that executes when PR action is closed, checking out the base branch instead of the PR head.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Single file with straightforward conditional step additions
  • Verify the conditional syntax (if: github.event.action == 'closed') is correct
  • Confirm branch references are accurate for both opened and closed PR scenarios

Poem

🐰 A workflow so clever, with branches to choose,
When PR's are opened, we stay in the news,
But when they are closed—ah, a twist in the tale!
Base branch takes over, the old one will pale,
Checkout steps dancing, conditional and true! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description addresses the PR objectives and explains the technical changes (checkout behavior for closed vs open PR events) with testing information, but does not follow the repository's required template structure. Align the description with the repository template by addressing the five required checklist items (relative links, file naming conventions, asset organization, duplicate PRs check, and build status).
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: adding conditional checkout logic to handle repository cleanup on PR close events.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/fix-deployment-error-in-pr-build

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

@elibosley elibosley changed the title Ensure PR preview cleanup checks out repo on close fix: Ensure PR preview cleanup checks out repo on close Nov 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2025-11-27 03:47 UTC

@elibosley elibosley merged commit 04ccb39 into main Nov 27, 2025
3 checks passed
@elibosley elibosley deleted the codex/fix-deployment-error-in-pr-build branch November 27, 2025 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants