From 2e97c5eff222ed1792717c6e1329d335750c648b Mon Sep 17 00:00:00 2001 From: Lenka Segura Date: Nov 10 2022 10:40:03 +0000 Subject: Add a hint for rejecting a push to disabled branch --- diff --git a/dist_git_auth.py b/dist_git_auth.py index 71b064e..d17c08d 100644 --- a/dist_git_auth.py +++ b/dist_git_auth.py @@ -247,7 +247,7 @@ class DistGitAuth(GitAuthHelper): pdc_ref = branch_overrides[project.namespace][refname] is_supported = self.is_supported_branch(project, pdc_ref) if is_supported is False: - self.info("Branch %s is unsupported" % refname) + self.info("Branch %s is unsupported. Cannot push to a disabled branch (maybe eol?)." % refname) return False elif is_supported is True: self.debug("Branch %s is supported" % refname) diff --git a/pagure_distgit_tests/test_dist_git_auth.py b/pagure_distgit_tests/test_dist_git_auth.py index d94cdee..a39d34b 100644 --- a/pagure_distgit_tests/test_dist_git_auth.py +++ b/pagure_distgit_tests/test_dist_git_auth.py @@ -470,7 +470,7 @@ class DistGitAuthTestsFedora(DistGitAuthTests): ) ) - self.expect_info_msg("Branch refs/heads/f26 is unsupported") + self.expect_info_msg("Branch refs/heads/f26 is unsupported. Cannot push to a disabled branch (maybe eol?).") @patch("dist_git_auth.requests") def test_protected_supported_branch_committer(self, mock_requests):