Skip to content

pr_exists porch check fails when PR is merged before gate approval #568

@waleedkadous

Description

@waleedkadous

Bug

The pr_exists porch check uses gh pr list which defaults to --state open. When a PR is merged before the gate is approved (e.g. architect approves late), the check returns 0 results and blocks the gate.

Root Cause

In codev-skeleton/protocols/*/protocol.json, the pr_exists check command is:

gh pr list --head {{branch}} --json number --jq 'length'

gh pr list defaults to --state open. Once a PR is merged, it's no longer in the "open" state, so the check returns 0 and porch blocks.

Fix

Add --state all to the pr_exists check in all protocol.json files:

gh pr list --state all --head {{branch}} --json number --jq 'length'

Affected Files

  • codev-skeleton/protocols/spir/protocol.json
  • codev-skeleton/protocols/air/protocol.json
  • codev-skeleton/protocols/aspir/protocol.json
  • Any other protocol.json with a pr_exists check

Notes

Already fixed locally in marketmaker's spir/protocol.json. Needs upstream fix in the codev-skeleton so all new installs and codev update get the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions