<commit_before># Travis

## Credentials
- **access_token**: Your Travis access token which you can obtain from the command line via `travis login`
or...
- **github_token**: Instead of a Travis token you can also use a Github token which you can obtain from Account Settings > Applications > Personal access token

## Rebuild

- **repo**: the repo slug (e.g. rails/rails) for the build you want to rebuild
- **pro**: (optional, default:false) whether you are using Travis Pro version (private repos)
- **build_number**: (optional) the build number you want to re-build. By default will use the last build.<commit_msg>closes #6<commit_after># Travis

## Authentication
Authentication can be achieve with either an access token or a github token. 

- **access_token**: Your Travis access token which you can obtain from the command line via `travis login`
- **github_token**: Instead of a Travis token you can also use a Github token which you can obtain from Account Settings > Applications > Personal access token

**credentials.yml**
    travis:
      access_token: <PASSWORD>

## Rebuild
The Rebuild Action (`travis::rebuild`) can be used to re-run a recent build.

### Parameters
- **repo**: the repo slug (e.g. rails/rails) for the build you want to rebuild
- **pro**: (optional, default:false) whether you are using Travis Pro version (private repos)
- **build_number**: (optional) the build number you want to re-build. By default will use the last build.

### Output
- **repository_id**: The Github repository ID
- **commit_id**: Last commit ID for the build
- **number**: The build number being rebuilt
- **pull_request**: Message from the pull request for the build
- **pull_request_number**: Github Pull Request number
- **pull_request_title**: Github Pull Request title
- **state**: Build state
- **started_at**: Start time of build (may be nill)
- **finished_at**: End time of build (may be nill)
- **duration**: Duration fo build (may be nill)
- **job_ids**: Job IDs for the build

### Example
    listen 'timer::every', minutes:60 do |timer_info|
      run 'travis::rebuild', repo:'skierkowski/hello' do |build|
        info "Restarting build # #{build.number} for repo #{build.id}"
      end
    end

{'fraction_non_alphanumeric': 0.11246612466124661, 'fraction_numerical': 0.0013550135501355014, 'mean_word_length': 4.3117505995203835, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3795945', 'n_tokens_mistral': 630, 'n_tokens_neox': 603, 'n_words': 291}