<commit_before>[Documentation index](../README.md#documentation)

# A basic example

Substitute these with your credentials:

GITHUB_USER="GRANDE_USER"
GITUB_PWD_OR_TOKEN="<PASSWORD>"
```

```shell
echo "machine api.github.com login $GITHUB_USER password $GITUB_PWD_OR_TOKEN > /~.netrc"
sudo chmod 0600 ~/.netrc
echo "#! /bin/bash" > /tmp/tests.sh
chmod +x /tmp/tests.sh
gitarro.rb -r openSUSE/gitarro -c "ruby-test" -t /tmp/tests.sh
```

# Current syntax

```shell
Usage: gitarro.rb [options]

Mandatory options:
    -r, --repo 'REPO'                GitHub repository to look for PRs. For example: openSUSE/gitarro.
    -c, --context 'CONTEXT'          Context to set on comment (test name). For example: python-test.
    -t, --test 'TEST.SH'             Command, or full path to script/binary to be used to run the test.

Optional options:
    -f, --file '.py'                 pr_file type to filter/trigger the test against: .py, .rb
    -d, --description 'DESCRIPTION'  Test decription
    -C, --check                      Check if there is any PR requiring a test, but do not run it.
    -u, --url 'TARGET_URL'           Specify the URL to append to add to the GitHub review. Usually you                                   will use an URL to the Jenkins build log.
    -P  --PR 'NUMBER'                Specify the PR number instead of checking all of them. This will                                     force gitarro to run the against a specific PR number,even if it is                                  not needed (useful for using Jenkins with GitHub webhooks).
        --https                      If present, use https instead of ssh for git operations
        --changed_since 'SECONDS'    If present, will only check PRs with a change in the last X seconds<commit_msg>fix doc<commit_after>[Documentation index](../README.md#documentation)

# A basic example

Substitute these with your credentials:
```
GITHUB_USER="GRANDE_USER"
GITUB_PWD_OR_TOKEN="<PASSWORD>"
```

```shell
echo "machine api.github.com login $GITHUB_USER password $GITUB_PWD_OR_TOKEN > /~.netrc"
sudo chmod 0600 ~/.netrc
echo "#! /bin/bash" > /tmp/tests.sh
chmod +x /tmp/tests.sh
gitarro.rb -r openSUSE/gitarro -c "ruby-test" -t /tmp/tests.sh
```

# Current syntax

```shell
Usage: gitarro.rb [options]

Mandatory options:
    -r, --repo 'REPO'                GitHub repository to look for PRs. For example: openSUSE/gitarro.
    -c, --context 'CONTEXT'          Context to set on comment (test name). For example: python-test.
    -t, --test 'TEST.SH'             Command, or full path to script/binary to be used to run the test.

Optional options:
    -f, --file '.py'                 pr_file type to filter/trigger the test against: .py, .rb
    -d, --description 'DESCRIPTION'  Test decription
    -C, --check                      Check if there is any PR requiring a test, but do not run it.
    -u, --url 'TARGET_URL'           Specify the URL to append to add to the GitHub review. Usually you                                   will use an URL to the Jenkins build log.
    -P  --PR 'NUMBER'                Specify the PR number instead of checking all of them. This will                                     force gitarro to run the against a specific PR number,even if it is                                  not needed (useful for using Jenkins with GitHub webhooks).
        --https                      If present, use https instead of ssh for git operations
        --changed_since 'SECONDS'    If present, will only check PRs with a change in the last X seconds
{'fraction_non_alphanumeric': 0.09152351450295691, 'fraction_numerical': 0.002252886510842016, 'mean_word_length': 2.088695652173913, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2301445', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1022, 'n_words': 422}