Beispiel #1
0
def send2nntp(token, g, o, r, s):
    """
    Send issues to nntp server.

    :param token: token
    :type token: str
    :param g: newsgroup
    :type g: str
    :param o: owner
    :type o: str
    :param r: repo
    :type r: str
    :param s: since
    :type s: str
    """
    import github2nntp.nntp as nntp
    import github2nntp.comments as comments

    t = retrieve(token, o, r, s)
    for i in conv(t):
        logging.info("Processing issue {}".format(i["number"]))
        if i["created_at"] == i["updated_at"]:
            # This means that the issue are new.
            logging.info("Look like issue {} is new".format(i["number"]))
            nntp.post(g, write_new(g, i))
Beispiel #2
0
def send2nntp(token, g, o, r, s):
    """
    Send issues to nntp server.

    :param token: token
    :type token: str
    :param g: newsgroup
    :type g: str
    :param o: owner
    :type o: str
    :param r: repo
    :type r: str
    :param s: since
    :type s: str
    """
    import github2nntp.nntp as nntp

    t = retrieve(token, o, r, s)
    for i in conv(t):
        logging.info('Processing comment {}'.format(i['id']))
        nntp.post(g, write_new(g, i))