Skip to content

ci(release): merge the release pull request every 6 hours #3921

Closed

Description

@dan-petty

Problem

A person merges the release pull request that release-please opens, except for an urgent fix (#1966). On 2026-11-07 the owner asked for the release pull request to merge by itself every 6 hours. Until it merges, merged work stays unreleased and the images of the cluster do not move.

Expected

A scheduled workflow (cron every 6 hours, and workflow_dispatch) finds the open release pull request and merges it with the squash method, only when every guard holds:

  • The release App opened it from the release-please branch, it is not a draft, and it has the label autorelease: pending.
  • Its title is chore(main): release <version>.
  • It changes only the files that release-please writes: CHANGELOG.md, .release-please-manifest.json, pyproject.toml and uv.lock.
  • Every required check of main passed on its head commit, no other check on that commit failed, and no required check of the head of main failed.
  • GitHub reports it as mergeable.
  • It has no label hold-release. A person sets this label to stop the merge.

The workflow merges at most one pull request in a run, uses the release App token only for the merge, and never edits the pull request, the tag, CHANGELOG.md or a version. RELEASE_CYCLE.md states the step, the cadence, how to hold a release and how to turn it off.

Acceptance criteria

  • The guard logic is Python under src/devops_cli/release/ with offline tests for each guard: author, branch, draft, label, title, files, checks, red main, mergeability and hold label.
  • .github/workflows/release-merge.yml runs on cron: "0 */6 * * *" and workflow_dispatch, pins actions by SHA, has least permissions and one concurrency group, and passes zizmor and actionlint.
  • A test pins the cron to every 6 hours and the permissions of the workflow.
  • RELEASE_CYCLE.md and the one exception in AGENTS.md ("Only a person merges pull requests") are written, and .github/labels.yml declares hold-release.

Existing tool considered

GitHub auto-merge (gh pr merge --auto --squash) merges when the checks pass, with no schedule and no guard on files or labels, so it does not give the 6 hour cadence. The ruleset of main already requires 0 approvals and allow_auto_merge is on, so the merge needs no change to a repository setting. The change adds a small Python guard and one gh pr merge step.

Related

Activity

  1. added
    source/agent
    type/infra
    scope/release
    status/new
    value/medium
    effort/medium
    on Nov 7, 2026
  2. dan-petty commented on Nov 7, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/infra. The ci prefix of the title gives the type.
    • Scope: scope/release. The (release) scope of the title gives the scope.
    • Priority: P2-Medium. It removes a manual step from the release cycle but a person can still merge by hand, so it is not blocking.
    • Value: Medium. Releases ship on a fixed cadence without waiting for a person, reducing the gap between merged work and deployed images.
    • Effort: Medium. Requires a Python guard module with ten checks, a workflow file, offline tests, and documentation updates.
    • Related: feat(release): the release pull request merges itself after its checks when an urgent fix lands #1966, which asks for a different change. Both automate merging the release pull request; #1966 fires on an urgent-fix push event, the candidate fires on a 6-hour cron with a hold-label guard.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 7, 2026
  4. added a commit that references this issue on Nov 7, 2026
    b27279e
  5. removed
    status/in-progress
    owner/agent
    on Nov 7, 2026
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

    effort/mediumpriority/p2-mediumscope/releasesource/agenttype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions