def get_story_id(logs):
    """Returns the job_id of a run_script job."""
    for log in logs['job']:
        if log.get('job', '') == log.get('action', '') == 'run_script':
            return log['job_id']
    assert False