From 301357006c7078e7d1cb762d866de1daab582b70 Mon Sep 17 00:00:00 2001 From: Ondřej Nosek Date: May 13 2025 02:46:27 +0000 Subject: `retire`: extend the command's console help JIRA: RHELCMP-14522 Relates: rhbz#2189969 Signed-off-by: Ondřej Nosek --- diff --git a/fedpkg/cli.py b/fedpkg/cli.py index 209681a..e5ed34b 100644 --- a/fedpkg/cli.py +++ b/fedpkg/cli.py @@ -740,7 +740,7 @@ class fedpkgClient(cliClient): Note that the config file is a branch specific file. That means you could create package.cfg for each stream branch separately to indicate on which targets to build the package for a particular stream. - '''.format('\n'.join(textwrap.wrap(build_parser.description)))) + ''').format('\n'.join(textwrap.wrap(build_parser.description))) def register_do_disable_monitoring(self): help_msg = 'Disable monitoring of the current repository' @@ -780,6 +780,24 @@ class fedpkgClient(cliClient): description=description) disable_monitoring_parser.set_defaults(command=self.do_disable_monitoring) + def register_retire(self): + """Extends the retire's parent description""" + super(fedpkgClient, self).register_retire() + + retire_parser = self.subparsers.choices['retire'] + retire_parser.formatter_class = argparse.RawDescriptionHelpFormatter + retire_parser.description = textwrap.dedent(''' + {0} + + After a successful package retirement, there is an optional subsequent + step of executing a command: + + {1} disable-monitoring + + The `disable-monitoring` command is executed manually if desired. + + ''').format('\n'.join(textwrap.wrap(retire_parser.description)), self.name) + # Target functions go here def _format_update_clog(self, clog): ''' Format clog for the update template. '''