Skip to content

test: merge-bot eligibility check run (DO NOT MERGE)#5

Merged
qweered merged 1 commit into
masterfrom
merge-bot/eligibility-check-run
Apr 24, 2026
Merged

test: merge-bot eligibility check run (DO NOT MERGE)#5
qweered merged 1 commit into
masterfrom
merge-bot/eligibility-check-run

Conversation

@qweered

@qweered qweered commented Apr 24, 2026

Copy link
Copy Markdown
Owner

Fork-only test PR to verify the new merge-bot eligibility check run renders correctly in the PR's checks panel.

Will be closed once verified — do not merge.

Summary by CodeRabbit

  • New Features

    • Bot now creates GitHub checks on pull requests to display merge eligibility status, including a summary of requirements and eligible reviewers.
  • Chores

    • Updated GitHub workflow permissions to enable GitHub Checks API integration for merge bot eligibility tracking.

Render the merge-bot eligibility checklist as a GitHub Check Run on
the PR head commit so maintainers can see why a PR is or isn't
eligible directly from the PR's checks panel, without having to
comment `@NixOS/nixpkgs-merge-bot merge` first.

The check uses `success` for eligible PRs and `neutral` for
not-yet-eligible ones, so it never blocks merging on its own. Each
bot run upserts the check on the current head SHA (force-pushes get
a fresh check). The same `renderChecklist` helper is now reused by
the bot's reply comment.

Requires `checks: write` on both the workflow's fallback token and
the bot's GitHub App.
@qweered qweered merged commit c0db0b2 into master Apr 24, 2026
20 of 22 checks passed
@coderabbitai

coderabbitai Bot commented Apr 24, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 26e7250b-cd85-4b56-8ffa-27b17318d096

📥 Commits

Reviewing files that changed from the base of the PR and between 3bcfffa and fb68242.

📒 Files selected for processing (3)
  • .github/workflows/bot.yml
  • .github/workflows/pull-request-target.yml
  • ci/github-script/merge.js

📝 Walkthrough

Walkthrough

The pull request grants write permissions to GitHub Checks in GitHub Actions workflows and extends the merge bot to create/update a "merge-bot eligibility" check run alongside PR comments, with support for dry-run mode and eligible user listings.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/bot.yml, .github/workflows/pull-request-target.yml
Added checks: write permissions to enable the bot to create and update GitHub Checks resources.
Merge Bot Logic
ci/github-script/merge.js
Extracted checklist rendering into a reusable renderChecklist function; integrated GitHub Checks API to create/update a merge-bot eligibility check run with checklist summary and eligible users list; added dry-run mode logging for check payloads.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub
    participant Bot as Bot (merge.js)
    participant Check as Checks API
    participant PR as PR Comments API

    GH->>Bot: PR event trigger
    activate Bot
    Note over Bot: Run checklist logic
    Bot->>Bot: Extract eligible & checklist data
    Bot->>Bot: Render checklist to Markdown
    
    Bot->>PR: Post/update PR comment
    activate PR
    PR-->>Bot: Comment created
    deactivate PR
    
    alt dry-run enabled
        Bot->>Bot: Log check payload
    else normal execution
        Bot->>Check: Create/update check run
        activate Check
        Check-->>Bot: Check run created with conclusion
        deactivate Check
    end
    
    deactivate Bot
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A checklist born from one, now two,
The bot writes checks with proper cue,
GitHub's gears now spin with grace,
Eligible users find their place,
Dry runs logged before the race!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch merge-bot/eligibility-check-run

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 and usage tips.

@qweered qweered deleted the merge-bot/eligibility-check-run branch June 25, 2026 16:15
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