Skip to content

feat(config): add mergify config simulate command#1019

Merged
mergify[bot] merged 1 commit intomainfrom
devs/jd/feat/config-validate/Ied875a3ed104bea77a4bc7ab6d226a4e782bcb42
Mar 11, 2026
Merged

feat(config): add mergify config simulate command#1019
mergify[bot] merged 1 commit intomainfrom
devs/jd/feat/config-validate/Ied875a3ed104bea77a4bc7ab6d226a4e782bcb42

Conversation

@jd
Copy link
Member

@jd jd commented Mar 10, 2026

Add mergify config simulate command that queries the API simulator endpoint.

Copilot AI review requested due to automatic review settings March 10, 2026 14:39
@jd
Copy link
Member Author

jd commented Mar 10, 2026

This pull request is part of a stack:

  1. feat(config): add mergify config simulate command (#1019) 👈

@mergify mergify bot had a problem deploying to Mergify Merge Protections March 10, 2026 14:39 Failure
@mergify
Copy link
Contributor

mergify bot commented Mar 10, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify mergify bot requested a review from a team March 10, 2026 14:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new mergify config simulate CLI subcommand that allows users to simulate Mergify actions on a given pull request using a local configuration file. It sends the raw configuration YAML to the Mergify simulator API endpoint and displays the result. This builds on the config validate subcommand introduced in #1016.

Changes:

  • Added SimulatorResult dataclass and simulate_pr() async function to the config/validate module for calling the Mergify simulator API
  • Added simulate Click command with PR URL parsing, token/API-URL options, and Rich output formatting
  • Added tests covering happy path, invalid URL, API failure, and missing config file scenarios

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
mergify_cli/config/validate.py Adds SimulatorResult dataclass and simulate_pr() async function to POST to the simulator API
mergify_cli/config/cli.py Adds PR URL regex parser and simulate Click command with token/api-url options
mergify_cli/tests/config/test_validate.py Adds four tests for the simulate command: success, invalid URL, API failure, and config not found

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jd jd force-pushed the devs/jd/feat/config-validate/Ied875a3ed104bea77a4bc7ab6d226a4e782bcb42 branch from 65a045d to e046ae0 Compare March 10, 2026 14:59
@mergify mergify bot had a problem deploying to Mergify Merge Protections March 10, 2026 14:59 Failure
@mergify
Copy link
Contributor

mergify bot commented Mar 10, 2026

🧪 CI Insights

Here's what we observed from your CI run for 82be43f.

🟢 All jobs passed!

But CI Insights is watching 👀

Base automatically changed from devs/jd/feat/config-validate/Ib7a8075cd92a62a2a7d761a4eab5e309c914dd21 to main March 10, 2026 16:16
@mergify
Copy link
Contributor

mergify bot commented Mar 10, 2026

@jd this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Mar 10, 2026
Change-Id: Ied875a3ed104bea77a4bc7ab6d226a4e782bcb42
Claude-Session-Id: 35f710ae-3790-4349-b55b-82247979f4a8
@jd jd force-pushed the devs/jd/feat/config-validate/Ied875a3ed104bea77a4bc7ab6d226a4e782bcb42 branch from e046ae0 to 82be43f Compare March 11, 2026 06:34
@mergify mergify bot removed the conflict label Mar 11, 2026
@mergify mergify bot deployed to Mergify Merge Protections March 11, 2026 06:34 Active
@mergify mergify bot requested a review from a team March 11, 2026 09:06
@sileht sileht removed the request for review from a team March 11, 2026 09:07
@mergify
Copy link
Contributor

mergify bot commented Mar 11, 2026

Merge Queue Status

This pull request spent 2 minutes 23 seconds in the queue, including 2 minutes 9 seconds running CI.

Required conditions to merge

@mergify mergify bot added the queued label Mar 11, 2026
mergify bot added a commit that referenced this pull request Mar 11, 2026
@mergify mergify bot merged commit d3b2135 into main Mar 11, 2026
10 checks passed
@mergify mergify bot deleted the devs/jd/feat/config-validate/Ied875a3ed104bea77a4bc7ab6d226a4e782bcb42 branch March 11, 2026 09:10
@mergify mergify bot removed the queued label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants