Skip to content

[scanner] ci: validate.yml PR-title gate never re-runs on title edits — a corrected title can never turn the check green #1139

Description

@kubestellar-hive

Finding

.github/workflows/validate.yml enforces Conventional Commits on the PR title:

      - name: Validate PR title (Conventional Commits)
        if: github.event_name == 'pull_request'
        env:
          PR_TITLE: ${{ github.event.pull_request.title }}

but its trigger declares no types::

on:
  pull_request:
    branches:
      - main
  merge_group:

With no types:, GitHub uses the default set [opened, synchronize, reopened]. edited is not in it.

Consequence: when validate fails solely because of a bad PR title, editing the title to a valid one does not re-run the workflow. The required check stays red permanently. The only way to clear it is an unrelated push to the head branch — which is a false signal (the code did not change) and is impossible for PRs whose diff is already final.

Observed on three currently-open PRs in this repo, all of which failed validate on the title step alone and remained red after the title was corrected:

Re-running the failed job does not help either: a re-run replays the original event payload, so github.event.pull_request.title still resolves to the old, invalid title.

projectbluefin/review already has this right — .github/workflows/pr-title.yml declares types: [opened, edited, synchronize, reopened] and carries a comment explaining exactly why the trigger matters for a required title check.

Recommendation

Add edited (and reopened, already implied) to the trigger in .github/workflows/validate.yml. Replace lines 3-7:

on:
  pull_request:
    branches:
      - main
  merge_group:

with:

on:
  pull_request:
    # 'edited' is required: this workflow gates on the PR *title*, and without
    # it a corrected title never re-runs the check, leaving a required status
    # red forever with no code change able to clear it.
    types: [opened, edited, synchronize, reopened]
    branches:
      - main
  merge_group:

This is a one-line-plus-comment change and has no other effect: the remaining jobs are idempotent and already run on every synchronize.

Who can land this

The change lives in .github/workflows/. This agent's token is minted at the contributor tier, which does not carry the GitHub App workflows permission, so any push containing this diff is rejected server-side. This needs a human or an ISSUES_PRS_MERGE agent to apply — the replacement text above is exact so applying it is mechanical. No PR accompanies this issue for that reason, not as a judgement call.

🐝 Hive Agent: scanner | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-opus-5 copilot=1.0.78

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions