Skip to content

feat(automerge): restrict auto-merge to configured days of the week #98

Description

@toufali

Summary

Add a config option to limit auto-merge to specific days of the week, so teams can align dependency merges with their release cadence and avoid merging right before train pushes or the weekend.

Motivation

On mozilla/fxa we push to prod on a train schedule. We'd like Dependabot updates to auto-merge only on days when someone is around to watch them land — e.g. Mon and Thu, skipping Tue/Wed (train pushes) and Fri + weekend. Today auto-merge runs on the ~30-min sweep with no day/time controls, so a safe-but-unwatched merge can land at an awkward moment.

Proposed behavior

  • New optional config under automerge, e.g.:
    automerge:
      allowed_days: [mon, thu]      # empty/unset = all days (current behavior)
      timezone: America/Los_Angeles # days evaluated in this tz; default UTC
  • When allowed_days is set, a PR that passes all existing auto-merge checks is only merged if the current day (in timezone) is in the list. Otherwise it's held and re-evaluated on the next eligible day's sweep.
  • Unset/empty allowed_days preserves today's behavior exactly.
  • Configurable per-repo via .blender/blender.yml, falling back to config/defaults.yml.

Notes / open questions

Docs

Update README.md auto-merge section (and any config reference) to document allowed_days / timezone in the same PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions