From 9c522f1b3b3b0484075104cbb0dc3de9457a9a7d Mon Sep 17 00:00:00 2001 From: Jonas Maurus Date: Tue, 21 May 2024 23:26:47 +0200 Subject: [PATCH] create a Change when the current value is different from the desired value --- ghconf/plumbing/repositories/common_procs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghconf/plumbing/repositories/common_procs.py b/ghconf/plumbing/repositories/common_procs.py index a07a773..bbb6209 100644 --- a/ghconf/plumbing/repositories/common_procs.py +++ b/ghconf/plumbing/repositories/common_procs.py @@ -319,7 +319,7 @@ def delete_branch_on_merge(org: Organization, repo: Repository, Turns on a feature that enforces automatic branch deletion when a PR is merged """ def _set_delete_branch_on_merge(change: Change[str]) -> Change[str]: - print_debug("[%s] Enforcing branch deletion on PR merge" % highlight(repo.name)) + print_debug("[%s] Setting branch deletion on PR merge" % highlight(repo.name)) try: repo.edit(delete_branch_on_merge=value) except GithubException: @@ -327,7 +327,7 @@ def _set_delete_branch_on_merge(change: Change[str]) -> Change[str]: return change.success() - if not repo.delete_branch_on_merge: + if repo.delete_branch_on_merge != value: change = Change( meta=ChangeMetadata( executor=_set_delete_branch_on_merge,