def main()

in cicd-deployers/iam_metadata_extractor.py [0:0]


def main(args: collections.abc.Sequence[str]) -> int:
    """The main function parses command-line arguments and calls the run_workflow function to execute the complete Dataform workflow.
    To run the script, provide the required command-line arguments:
        python intro.py --project_id your_project_id --location your_location --repository your_repo_name --dataset your_bq_dataset --branch your_branch
    """
    parser = argparse.ArgumentParser(description="IAM metadata extractor from dataform repository")

    parser.add_argument("--remote_repo_url",
                        type=str,
                        required=True,
                        help="The github repository URL.")
    parser.add_argument("--dataform_repositories_git_token",
                        type=str,
                        required=True,
                        help="The GCP project Number where the Dataform code will be deployed.")

    params = parser.parse_args(args)
    remote_repo_url = str(params.remote_repo_url)
    dataform_repositories_git_token = str(params.dataform_repositories_git_token)

    auth = Auth.Token(dataform_repositories_git_token)
    g = Github(auth=auth)
    repo = g.get_user().get_repo("aef-sample-dataform-repo")

    list_sqlx_files(repo)