Example #1
0
def push():
  tracker = TrackerAPI(config.TRELLO_KEY, config.TRELLO_TOKEN)

  data = json.loads(request.data)

  state_router = {
    'success': 'green',
    'pending': 'yellow',
    'failure': 'red',
    'error'  : 'red',
  }

  state_details = {
    'card': data['pull_request']['body'],
    'state': state_router[data['state']]
  }

  tracker.change_state(**state_details)
  return render_template('response.html', response='done')
Example #2
0
def push():
    tracker = TrackerAPI(config.TRELLO_KEY, config.TRELLO_TOKEN)

    data = json.loads(request.data)

    state_router = {
        'success': 'green',
        'pending': 'yellow',
        'failure': 'red',
        'error': 'red',
    }

    state_details = {
        'card': data['pull_request']['body'],
        'state': state_router[data['state']]
    }

    tracker.change_state(**state_details)
    return render_template('response.html', response='done')
Example #3
0
def change_label():
    tracker = TrackerAPI(config.TRELLO_KEY, config.TRELLO_TOKEN)

    response = tracker.change_state(request.form['card'],
                                    request.form['state'])
    return render_template('response.html', response=response)
Example #4
0
def change_label():
  tracker = TrackerAPI(config.TRELLO_KEY, config.TRELLO_TOKEN)

  response = tracker.change_state(request.form['card'], request.form['state'])
  return render_template('response.html', response=response)