forked from releng/tooling
Remove fedscm_admin bits
I've extended the initial comment to better explain how to use the script and removed the `fedscm_admin` code since we're no longer maintain that tool. Signed-off-by: mattia <mattia.verga@proton.me>
This commit is contained in:
parent
79f6db6d1a
commit
52abc67064
1 changed files with 8 additions and 17 deletions
|
|
@ -3,10 +3,13 @@
|
|||
"""
|
||||
This script queries dist-git for all the packages a given packager maintains,
|
||||
has commit or watches.
|
||||
Package that the packager is the main admin are then orphaned. The packager is
|
||||
then removed from all packages that they have commit for and their watch status
|
||||
is reset on every packages that they are watching.
|
||||
|
||||
If used with the --retire flag, package that the packager is the main admin
|
||||
are then orphaned. The packager is then removed from all packages that they
|
||||
have commit for and their watch status is reset on every packages that they
|
||||
are watching.
|
||||
To use with the --retire flag you'll need a pagure (src.fp.o) token with the
|
||||
appropriate rights and you'll need to pass it within the --api-token arg
|
||||
or set it into the PAGURE_TOKEN env variable.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
|
|
@ -270,22 +273,10 @@ def main(args):
|
|||
global pagure_token
|
||||
pagure_token = args.pagure_token
|
||||
|
||||
if not pagure_token and args.retire:
|
||||
_log.debug(
|
||||
"Trying to retrieve pagure_api_token from the fedscm configuration file"
|
||||
)
|
||||
try:
|
||||
import fedscm_admin.config
|
||||
from fedscm_admin import CONFIG
|
||||
|
||||
api_token = fedscm_admin.config.get_config_item(CONFIG, "pagure_api_token")
|
||||
except:
|
||||
pass
|
||||
|
||||
if not pagure_token and args.retire:
|
||||
print(
|
||||
"No pagure token set in the CLI argument or via the PAGURE_TOKEN "
|
||||
"environment variable or found in the fedscm configuration file. "
|
||||
"environment variable. "
|
||||
"Going to ignore --retire"
|
||||
)
|
||||
args.retire = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue