def serve()

in cli.py [0:0]


def serve(args):
    if not args.gh_url or not args.jira_url:
        fail("Both GitHub and JIRA URL have to be specified!")

    if not args.gh_token:
        fail("No GitHub token specified!")

    if not args.jira_user or not args.jira_token:
        fail("No JIRA credentials specified!")

    if not args.jira_project:
        fail("No JIRA project specified!")

    if not args.secret:
        fail("No Webhook secret specified!")

    github = ghlib.GitHub(args.gh_url, args.gh_token)
    jira = jiralib.Jira(args.jira_url, args.jira_user, args.jira_token)
    s = Sync(
        github,
        jira.getProject(args.jira_project, args.jira_labels),
        direction=direction_str_to_num(args.direction),
    )
    server.run_server(s, args.secret, port=args.port)