Skip to content

[iobroker-bot] Setup Auto-Merge for Dependabot PRs - #2407

Merged
GermanBluefox merged 1 commit into
ioBroker:masterfrom
ioBroker-Bot:update-from-template-X0000-setupAutomergeDependabot-1792061428
Oct 16, 2026
Merged

GermanBluefox merged 1 commit into
ioBroker:masterfrom
ioBroker-Bot:update-from-template-X0000-setupAutomergeDependabot-1792061428

Conversation

@ioBroker-Bot

Copy link
Copy Markdown
Contributor

German description can be found below | Deutsche Beschreibung weiter unten

General information

This PR has been created by iobroker-bot. Please review the changes carefully and merge the PR if review is ok.

Feel free to contact me (@ioBroker-Bot) if you have any questions or feel that a PR is faulty. Please open an issue at repository https://github.com/ioBroker/ioBroker.repochecker to report a faulty PR.

And THANKS A LOT for maintaining this adapter from me and all users.
Let's work together for the best user experience.

your
ioBroker Check and Service Bot

@mcm1957 for evidence

Changes provided by this PR

This PR adapts the existing automatic merging setup for Dependabot pull requests. An existing workflow using iobroker-bot-orga/action-automerge-dependabot was detected (automerge-dependabot.yml) and will be updated.

Background

GitHub has announced that they will discontinue processing Dependabot merge commands on January 27, 2026. The old approach of using comment commands like @dependabot merge will no longer work after this date.

Additionally, GitHub will block the pull_request_target trigger by default starting November 2, 2026 for all PRs based on a fork. Existing workflows using pull_request_target need to be migrated to pull_request before that date. This PR uses the pull_request trigger, which is sufficient for Dependabot PRs because GitHub grants write-access tokens to workflows triggered by Dependabot even with the standard pull_request event.

What this PR does

This PR replaces the current setup for auto-merging Dependabot PRs with a new workflow that uses the iobroker-bot-orga/action-automerge-dependabot action. Specifically:

  1. Updates existing workflow: The existing workflow file .github/workflows/automerge-dependabot.yml is updated to use the pull_request trigger instead of pull_request_target. This is required because GitHub will block pull_request_target for all fork PRs by default starting November 2, 2026.

  2. Creates auto-merge configuration: If not already present, a configuration file .github/auto-merge.yml is created. This file defines which types of dependency updates should be automatically merged:

    • Production dependencies: Only patch updates (e.g., 1.0.0 → 1.0.1) are automatically merged
    • Development dependencies: Both patch and minor updates (e.g., 1.0.0 → 1.1.0) are automatically merged
  3. Disables old workflows: If existing automerge workflow files are found (such as dependabot-automerge.yml or dependabot-auto-merge.yml), they will be renamed to .OLD files. This preserves them for reference but prevents them from running.

Important notes

This PR is not mandatory. It is up to the developer to review and decide whether to merge this PR.

The new workflow will:

  • Only run for Dependabot PRs
  • Wait for all required checks to pass before merging
  • Respect the merge rules defined in .github/auto-merge.yml
  • Not merge updates that don't match the configured rules

Configuration

The default configuration in .github/auto-merge.yml can be customized to match your needs. For example, you can:

  • Allow all patch updates for all dependencies
  • Allow major updates for development dependencies
  • Add custom matching rules

Please refer to the comments in the .github/auto-merge.yml file for more configuration options and examples.

References


Deutsche Beschreibung

Dieser PR passt das vorhandene Setup zum automatischen Mergen von Dependabot-Pull-Requests an. Ein bestehender Workflow, der iobroker-bot-orga/action-automerge-dependabot verwendet, wurde gefunden (automerge-dependabot.yml) und wird aktualisiert.

Hintergrund

GitHub hat angekündigt, dass die Verarbeitung von Dependabot-Merge-Befehlen am 27. Januar 2026 eingestellt wird. Der alte Ansatz mit Kommentar-Befehlen wie @dependabot merge wird nach diesem Datum nicht mehr funktionieren.

Darüber hinaus wird GitHub den pull_request_target-Trigger ab dem 2. November 2026 standardmäßig blockieren, und zwar für alle PRs, die auf einem Fork basieren. Bestehende Workflows, die pull_request_target verwenden, müssen vor diesem Datum auf pull_request migriert werden. Dieser PR verwendet den pull_request-Trigger, der für Dependabot-PRs ausreicht, da GitHub Workflows, die durch Dependabot ausgelöst werden, auch beim Standard-pull_request-Event Write-Access-Tokens gewährt.

Was dieser PR macht

Dieser PR ersetzt das aktuelle Setup zum automatischen Mergen von Dependabot-PRs durch einen neuen Workflow, der die Aktion iobroker-bot-orga/action-automerge-dependabot verwendet. Konkret:

  1. Aktualisiert vorhandenen Workflow: Die vorhandene Workflow-Datei .github/workflows/automerge-dependabot.yml wird aktualisiert, um den pull_request-Trigger anstelle von pull_request_target zu verwenden. Dies ist erforderlich, da GitHub pull_request_target für alle Fork-PRs ab dem 2. November 2026 standardmäßig blockieren wird.

  2. Erstellt Auto-Merge-Konfiguration: Falls noch nicht vorhanden, wird eine Konfigurationsdatei .github/auto-merge.yml erstellt. Diese Datei definiert, welche Arten von Abhängigkeits-Updates automatisch gemergt werden sollen:

    • Produktions-Abhängigkeiten: Nur Patch-Updates (z.B. 1.0.0 → 1.0.1) werden automatisch gemergt
    • Entwicklungs-Abhängigkeiten: Sowohl Patch- als auch Minor-Updates (z.B. 1.0.0 → 1.1.0) werden automatisch gemergt
  3. Deaktiviert alte Workflows: Falls vorhandene Automerge-Workflow-Dateien gefunden werden (wie dependabot-automerge.yml oder dependabot-auto-merge.yml), werden diese in .OLD-Dateien umbenannt. Dies bewahrt sie als Referenz, verhindert aber deren Ausführung.

Wichtige Hinweise

Dieser PR ist nicht verpflichtend. Es liegt am Entwickler, diesen PR zu prüfen und zu entscheiden, ob er gemergt werden soll.

Der neue Workflow wird:

  • Nur für Dependabot-PRs ausgeführt
  • Warten, bis alle erforderlichen Prüfungen bestanden sind, bevor gemergt wird
  • Die in .github/auto-merge.yml definierten Merge-Regeln beachten
  • Updates nicht mergen, die nicht den konfigurierten Regeln entsprechen

Konfiguration

Die Standardkonfiguration in .github/auto-merge.yml kann an die eigenen Bedürfnisse angepasst werden. Beispielsweise kann man:

  • Alle Patch-Updates für alle Abhängigkeiten erlauben
  • Major-Updates für Entwicklungs-Abhängigkeiten erlauben
  • Benutzerdefinierte Matching-Regeln hinzufügen

Bitte die Kommentare in der .github/auto-merge.yml-Datei für weitere Konfigurationsoptionen und Beispiele beachten.

Referenzen


You my recreate this PR by adding the following comment:
@ioBroker-Bot recreate


Template: X0000-setupAutomergeDependabot

@GermanBluefox
GermanBluefox merged commit f8e381f into ioBroker:master Oct 16, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants