Merge queue, merge protections, stack labels, and Test Insights (JUnit from CI).
| Item | Location |
|---|---|
| Config | .mergify.yml |
| Dashboard | dashboard.mergify.com |
| Test Insights | Mergify dashboard → CI → Test Insights |
| GitHub secret | MERGIFY_TOKEN |
| JUnit upload | ci-app.yml → mergifyio/gha-mergify-ci |
- Open Mergify dashboard and sign in with GitHub.
- Add organization/user RaminNietzsche and repository CVE-Radar.
- Confirm the Mergify GitHub App is installed on CVE-Radar with read/write on checks, PRs, and contents.
- Mergify dashboard → CVE-Radar → Merge Protections → Enable.
- Config in repo:
.mergify.yml→merge_protections+merge_protections_settings.reporting_method: check-runs. - GitHub → Settings → Branches (or Rulesets) → require check
Mergify Merge Protectionsonmain(optional, after first PR shows the check).
- Mergify dashboard → Settings → API keys (or GitHub integration → API key).
- Create key with
ciscope (name e.g.github-actions-cve-radar). - GitHub secret:
gh secret set MERGIFY_TOKEN --repo RaminNietzsche/CVE-RadarVerify:
gh secret list --repo RaminNietzsche/CVE-Radar | grep MERGIFY_TOKENMergify rules use these labels (create any missing under Issues → Labels):
| Label | Purpose |
|---|---|
automerge |
Queue PR for merge when protections pass |
stack |
Mergify stack / dependent PRs |
conflict |
Merge conflict (auto-toggled) |
dependencies |
Dependabot PRs |
no-automerge |
Block Dependabot auto-queue |
size/XS … size/XL |
T-shirt size from diff stats |
gh label create automerge --repo RaminNietzsche/CVE-Radar --color 0E8A16 --description "Queue for merge when CI passes"
gh label create dependencies --repo RaminNietzsche/CVE-Radar --color 0366D6 --description "Dependabot PR"
gh label create no-automerge --repo RaminNietzsche/CVE-Radar --color B60205 --description "Do not auto-queue"Push a PR that runs CI / App or run:
gh workflow run ci-app.yml --repo RaminNietzsche/CVE-RadarThen open Mergify → Test Insights — tests from junit.xml should appear.
Workflow: CI / App — job App (lint · typecheck · build)
- run: npm run test:ci # writes junit.xml + coverage/lcov.info
- uses: mergifyio/gha-mergify-ci@v19
with:
action: junit-process
token: ${{ secrets.MERGIFY_TOKEN }}
report_path: junit.xml
test_step_outcome: ${{ steps.tests.outcome }}Upload is best-effort (continue-on-error: true) so missing MERGIFY_TOKEN does not fail CI — but Test Insights stays empty until the token is set.
- Ensure Merge Protections and required CI checks are green.
- Add label
automergeto the PR. - Mergify auto-queues the PR when
auto_merge_conditionsmatch and every active merge protection passes, then squash-merges via queue ruledefault.
Manual queue: comment @mergifyio queue (does not require the automerge label).
Stack PRs: use mergify stack / branch prefix stack/ — auto-labeled stack.
| Step | Trigger |
|---|---|
| Label | Maintainer (or Dependabot rule) adds automerge |
| Wait | All path-gated merge protections pass → check Mergify Merge Protections turns green |
| Queue | auto_merge_conditions in .mergify.yml adds PR to merge queue default |
| Merge | Queue merge_conditions + GitHub ruleset required checks (branch protection injection) |
Protections mirror branch ruleset checks: App, Codecov, SonarCloud, Trivy, CodeQL (×3), npm audit, docs — each gated by the same path filters as workflows.
npm run test:ci # produces junit.xml at repo root| Symptom | Action |
|---|---|
| No Test Insights data | Set MERGIFY_TOKEN; confirm CI / App ran and junit.xml exists. |
Mergify Merge Protections failing |
Open check details; fix listed rule (often missing CI job for touched paths). |
| Stack PR not labeled | Add label stack manually or use branch stack/* / Depends-On: / Change-Id: (see .mergify.yml). |
| Automerge not queueing | Add label automerge, wait for Mergify Merge Protections + ruleset checks; resolve conflicts; enable Merge Protections in dashboard. |
| Dependabot not auto-queued | Only patch/minor production deps without no-automerge; major updates need manual review. |