Exemplo n.º 1
0
def get_commit_text(config, auth):
  res = most_recent_commit(config=config)
  if res:
    commit, description = res
    try:
      url = get_commit_url(commit, config, auth)
    except:
      LOGGER.error("Couldn't get commit URL for '%s', '%s'", commit, description)
      raise

    return String.truncate_suffix(INTRO + description, url, Twitter.TWITTER_SIZE)

  else:
    LOGGER.error('Failed to git commit')
    return None
Exemplo n.º 2
0
def get_commit_text(config, auth):
    res = most_recent_commit(config=config)
    if res:
        commit, description = res
        try:
            url = get_commit_url(commit, config, auth)
        except:
            LOGGER.error("Couldn't get commit URL for '%s', '%s'", commit,
                         description)
            raise

        return String.truncate_suffix(INTRO + description, url,
                                      Twitter.TWITTER_SIZE)

    else:
        LOGGER.error('Failed to git commit')
        return None
Exemplo n.º 3
0
def post_update(text, auth, *names):
  text = String.truncate(text, TWITTER_SIZE)
  for name in names:
    get_api(auth, name).PostUpdate(text)
  return text
Exemplo n.º 4
0
def post_update(text, auth, *names):
  text = String.truncate(text, TWITTER_SIZE)
  for name in names:
    get_api(auth, name).PostUpdate(text)
  return text