Skip to content

Check gate still fails after failed then passing PR checks (same head SHA, e.g. PR title validation) #461

@whajj

Description

@whajj

When a required check fails on a PR and branch-deploy is invoked (e.g. via issue_comment), then the failing check is fixed without a new commit (same head_sha — e.g. editing the PR title so a workflow re-runs and passes), a later branch-deploy invocation can still report that checks do not pass / deployment cannot proceed, even though the PR UI shows all required checks green for the current head.

Steps to reproduce

  1. Open a PR where a workflow runs on pull_request types including edited and can fail without changing head_sha (example: validate PR title format).
  2. Confirm the check is failed on the PR head commit.
  3. Trigger branch-deploy (e.g. deployment comment) — expect it to correctly refuse while checks fail.
  4. Fix the condition (e.g. edit PR title) so the same workflow runs again and the check turns success for the same head_sha.
  5. Trigger branch-deploy again.

Expected behavior

branch-deploy evaluates the latest check results for the PR head and allows the deploy when all required checks pass.

Actual behavior

branch-deploy still reports that checks do not pass (or equivalent), despite the PR showing passing checks.

Environment

  • github/branch-deploy version: v11 (replace with your exact ref)
  • Workflow: on: issue_commenttypes: [created]
  • Required checks include a job not listed in ignored_checks, which can flip pass/fail on pull_request edited without a new commit
name: Validate PR title

on:
  pull_request:
    types: [opened, edited, synchronize, reopened]

jobs:
  validate-title:
    name: Validate title format
    runs-on: ubuntu-latest
    steps:
      - name: Check PR title
        shell: bash
        run: |
          set -euo pipefail

          title="${{ github.event.pull_request.title }}"
          echo "PR title: ${title}"

          # Required format:
          # DEMO-30029 - Restore Demo-CI bacpac for local development
          regex='^RAIL-[0-9]+[[:space:]]-[[:space:]].+$'

          if [[ ! "${title}" =~ ${regex} ]]; then
            echo "Invalid PR title format."
            echo "Expected: DEMO-<number> - <description>"
            echo "Example: DEMO-30029 - Restore Demo-CI bacpac for local development"
            exit 1
          fi

          echo "PR title format is valid."

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions