Repository navigation
infra: add Mergify serial merge queue for dev branch #335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TFT444
wants to merge
17
commits into
dev
Choose a base branch
from
infra/334-mergify-queue
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
77a64e7
infra: add Mergify serial merge queue for dev branch
TFT444 b588670
docs: fix merge-queue.md review findings
TFT444 b50e3a9
fix(mergify): remove invalid speculative_checks, add queue_conditions…
TFT444 44138e0
fix(mergify): address review feedback from ritiksah141
TFT444 96f44c0
fix(mergify): gate CodeQL checks in merge_conditions
TFT444 edafe72
fix(mergify): complete check coverage, harden queue, fix dismiss policy
TFT444 c7b0da7
fix(mergify): set changes_requested: false, document inactive-reviewe…
TFT444 0fb130b
fix(mergify): require 2 approvals for governance-policy file changes
TFT444 3e8d77d
fix(mergify): correct phantom check names and guard dismiss rule agai…
TFT444 ac8d6f6
fix(mergify): require project lead approval for governance paths and …
TFT444 6fbabce
docs: update governance-policy section to match actual Mergify condition
TFT444 db8525f
fix(infra): update mergify.yml URL to OWASP repo location
TFT444 e9b88a5
fix(mergify): add draft and blocked guards to queue_conditions, fix P…
TFT444 805886f
Merge dev into PR 335 before queue policy verification
TFT444 d36ba70
test(mergify): guard queue review and governance policy
TFT444 e3d8a7d
docs(mergify): describe queue updates without assuming merge strategy
TFT444 9dd6ceb
fix(deps): require patched Werkzeug and multidict releases
TFT444 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| # .mergify.yml | ||
| # Merge-queue configuration for the OpenShield dev branch. | ||
| # | ||
| # This file is inactive until the Mergify GitHub App is installed and | ||
| # authorized for this repository. GitHub Actions remains the CI system. | ||
| # Mergify reads pull-request state and operates the queue; it does not | ||
| # run CI, replace existing workflows, or bypass GitHub branch protection. | ||
| # | ||
| # Related: https://github.com/OWASP/openshield/issues/334 | ||
|
|
||
| # Limit speculative checks globally so at most one PR is tested at a time. | ||
| # This enforces serial behaviour across the queue. | ||
| merge_queue: | ||
| max_parallel_checks: 1 | ||
|
|
||
| queue_rules: | ||
| - name: default | ||
| # Restrict queue entry to PRs targeting dev, including manual | ||
| # @mergifyio queue commands. Without this, a maintainer could | ||
| # manually queue a PR targeting any branch. | ||
| queue_conditions: | ||
| - base=dev | ||
| - -draft | ||
| - -label=blocked | ||
|
|
||
| # One PR merged per operation. Combined with max_parallel_checks: 1 | ||
| # above, this gives a fully serial merge queue. | ||
| batch_size: 1 | ||
|
|
||
| # Dequeue a PR whose required checks have not posted within this | ||
| # window instead of stalling the entire queue indefinitely. The | ||
| # default ("auto") applies no timeout until enough queue history has | ||
| # been gathered, so a stuck check on the very first queued PR would | ||
| # block every subsequent PR forever. | ||
| checks_timeout: 2 hours | ||
|
|
||
| # These conditions must hold at the moment Mergify merges the PR. | ||
| # Mergify re-evaluates them after updating against the current dev HEAD. | ||
| # | ||
| # CI Summary aggregates all jobs inside ci.yml, including the frontend | ||
| # build (Frontend (lint + build)) and Astro build and rendered-site | ||
| # verification (Website (Astro build + verification)). CodeQL runs in a separate workflow | ||
| # (codeql.yml) and is NOT included in CI Summary; it posts two check | ||
| # runs named "Analyze (python)" and "Analyze (javascript)", both listed | ||
| # below. | ||
| # | ||
| # External Semgrep app checks (Semgrep OSS, semgrep-cloud-platform/scan) | ||
| # are deliberately not gated: their coverage duplicates the SAST | ||
| # (Semgrep) job already gated through CI Summary, and third-party app | ||
| # checks can vanish if the app is uninstalled or its plan changes, | ||
| # which would stall the queue permanently. | ||
| merge_conditions: | ||
| - check-success=CI Summary | ||
| - check-success=DCO sign-off | ||
| - check-success=dependency-review | ||
| - check-success=Analyze (python) | ||
| - check-success=Analyze (javascript) | ||
| # terraform-plan only runs for PRs touching infra/terraform/**. An | ||
| # unconditional check-success would stall every non-terraform PR | ||
| # forever. This condition passes when the PR touches no terraform | ||
| # files; otherwise the check must be green. | ||
| - or: | ||
| - -files~=^infra/terraform/ | ||
| - check-success=Terraform fmt / validate / plan | ||
| - "#approved-reviews-by>=1" | ||
| # Governance-policy files require project lead (@Vishnu2707) + one | ||
| # additional maintainer per GOVERNANCE.md §5. MAINTAINERS.md is included | ||
| # because it names the role-holders referenced by that policy. | ||
| # This condition enforces that: either the PR does not touch governance | ||
| # files, or it has two approvals AND the project lead has approved. | ||
| - or: | ||
| - -files~=^(GOVERNANCE\.md|MAINTAINERS\.md|\.mergify\.yml|docs/merge-queue\.md)$ | ||
| - and: | ||
| - "#approved-reviews-by>=2" | ||
| - approved-reviews-by=Vishnu2707 | ||
| - "#changes-requested-reviews-by=0" | ||
| - "#review-threads-unresolved=0" | ||
| - -draft | ||
| - -label=blocked | ||
|
|
||
| pull_request_rules: | ||
| # Dismiss stale approvals when a new commit is pushed to a dev-targeted PR. | ||
| # CHANGES_REQUESTED reviews are intentionally NOT dismissed (changes_requested | ||
| # is explicitly set to false). A reviewer's objection must survive the | ||
| # contributor's push and be cleared only by the reviewer re-reviewing, or | ||
| # by a maintainer manually dismissing it via GitHub after verifying the fix | ||
| # (see the inactive-reviewer process in docs/merge-queue.md). | ||
| # Auto-dismissing CHANGES_REQUESTED reviews would allow any push followed | ||
| # by a third-party approval to silently erase a blocking concern without | ||
| # the original reviewer ever checking the fix. | ||
| # | ||
| # Reviewers: use inline conversation threads for every blocking concern. | ||
| # Threads survive this dismissal and continue to block via | ||
| # #review-threads-unresolved=0, giving an independent gate beyond the | ||
| # review verdict itself. | ||
| - name: dismiss stale approvals on new push | ||
| conditions: | ||
| - base=dev | ||
| # Exclude Mergify's own queue-rebase commits so they don't strip | ||
| # approvals mid-flight and cause an infinite dequeue/re-approve cycle. | ||
| - sender!=mergify[bot] | ||
| actions: | ||
| dismiss_reviews: | ||
| approved: true | ||
| changes_requested: false | ||
| message: "A new commit was pushed. Please re-review and re-approve before this PR can merge." | ||
|
|
||
| # Queue an eligible PR automatically once all conditions are met. | ||
| # Entry conditions mirror merge_conditions so only fully green PRs | ||
| # enter the queue. A PR admitted while a check is still pending | ||
| # occupies the single queue slot and stalls every PR behind it. | ||
| - name: add to merge queue when eligible | ||
| conditions: | ||
| - base=dev | ||
| - check-success=CI Summary | ||
| - check-success=DCO sign-off | ||
| - check-success=dependency-review | ||
| - check-success=Analyze (python) | ||
| - check-success=Analyze (javascript) | ||
| - or: | ||
| - -files~=^infra/terraform/ | ||
| - check-success=Terraform fmt / validate / plan | ||
| - "#approved-reviews-by>=1" | ||
| - or: | ||
| - -files~=^(GOVERNANCE\.md|MAINTAINERS\.md|\.mergify\.yml|docs/merge-queue\.md)$ | ||
| - and: | ||
| - "#approved-reviews-by>=2" | ||
| - approved-reviews-by=Vishnu2707 | ||
| - "#changes-requested-reviews-by=0" | ||
| - "#review-threads-unresolved=0" | ||
| - -draft | ||
| - -label=blocked | ||
| actions: | ||
| queue: | ||
| name: default | ||
|
|
||
| # Apply awaiting-author when a reviewer has requested changes. | ||
| - name: label awaiting-author when changes are requested | ||
| conditions: | ||
| - base=dev | ||
| - "#changes-requested-reviews-by>0" | ||
| actions: | ||
| label: | ||
| add: | ||
| - awaiting-author | ||
|
|
||
| # Remove awaiting-author once all change requests are resolved. | ||
| - name: remove awaiting-author when no changes are requested | ||
| conditions: | ||
| - base=dev | ||
| - label=awaiting-author | ||
| - "#changes-requested-reviews-by=0" | ||
| actions: | ||
| label: | ||
| remove: | ||
| - awaiting-author |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking: the merge queue currently requires
CI Summary, but it does not require the separateBuild sitecheck introduced by.github/workflows/website.yml.The existing
CI Summarycovers the older website script test, not the Astro build and rendered-site verification. As a result, a PR could satisfy all configured queue conditions while the website build is failing.Please either add
Build siteas an explicit merge condition or make the website build part ofCI Summary. Please also add validation confirming that a failing website build prevents queue entry or merge.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was working on it the pr was drift also commeted not to do review now anyway i have fix everything i believe now can u re - review it please. Thank u