code: def run():
      args = parse_args()
      codetools.setup_logging(args.debug)
      git_tag = args.tag
      git_email = codetools.lookup_email(args)
      git_user = codetools.lookup_user(args)
      if not args.manifest_only:
          eups_tag = args.eups_tag
          if not eups_tag:
              eups_tag = eups.git_tag2eups_tag(git_tag)
          debug("using eups tag: {eups_tag}".format(eups_tag=eups_tag))
      manifest = args.manifest
      debug("using manifest: {manifest}".format(manifest=manifest))
      if not args.manifest_only:
          message_template = "Version {{git_tag}}"\
              " release from {eups_tag}/{manifest}".format(
                  eups_tag=eups_tag,
                  manifest=manifest,
              )
      else:
          message_template = "Version {{git_tag}}"\
              " release from manifest {manifest}".format(
                  manifest=manifest,
              )
      debug("using tag message: {msg}".format(msg=message_template))
      tagger = github.InputGitAuthor(
          git_user,
          git_email,
          codetools.current_timestamp(),
      )
      debug("using taggger: {tagger}".format(tagger=tagger))
      global g
      g = pygithub.login_github(token_path=args.token_path, token=args.token)
      org = g.get_organization(args.org)
      info("tagging repos in org: {org}".format(org=org.login))
      problems = []
      manifest_products = versiondb.Manifest(
          manifest,
          base_url=args.versiondb_base_url).products
      if not args.manifest_only:
          eups_products = eups.EupsTag(
              eups_tag,
              base_url=args.eupstag_base_url).products
          products, err = cross_reference_products(
              eups_products,
              manifest_products,
              ignore_manifest_versions=args.ignore_manifest_versions,
              fail_fast=False,
          )
          problems += err
      else:
          products = manifest_products
      if args.limit:
          products = dict(itertools.islice(products.items(), args.limit))
      products, err = get_repo_for_products(
          org=org,
          products=products,
          allow_teams=args.allow_team,
          ext_teams=args.external_team,
          deny_teams=args.deny_team,
          fail_fast=False,
      )
      problems += err
      products_to_tag, err = check_product_tags(
          products,
          git_tag,
          tag_message_template=message_template,
          tagger=tagger,
          force_tag=args.force_tag,
          fail_fast=False,
          ignore_git_message=args.ignore_git_message,
          ignore_git_tagger=args.ignore_git_tagger,
      )
      problems += err
      if args.verify:
          err = identify_products_missing_tags(products_to_tag)
          problems += err
      if problems:
          msg = "{n} pre-flight error(s)".format(n=len(problems))
          raise codetools.DogpileError(problems, msg)
      tag_products(
          products_to_tag,
          fail_fast=args.fail_fast,
          dry_run=args.dry_run,
      )