def _parse_args(args: List[str]) -> _SetArgumentsRunConfig:
    """
    Parses the given CLI arguments to get a run configuration.
    :param args: CLI arguments
    :return: run configuration derived from the given CLI arguments
    """
    parser = argparse.ArgumentParser(
        prog="gitlab-set-variables", description="Tool for setting a GitLab project's build variables")
    add_common_arguments(parser, project=True)
    parser.add_argument("source", nargs="+", type=str,
                        help="File to source build variables from. Can be a ini file, JSON file or a shell script "
                             "containing 'export' statements")

    arguments = parser.parse_args(args)
    return _SetArgumentsRunConfig(arguments.source, arguments.project, arguments.url, arguments.token, arguments.debug)