CommentCI
A tool to sent comments to Issues or Pull Requests in Github from CI tools.
Usage
Required environment variables:
GITHUB_COMMENT_USER
- User from which name will be sent comments to GithubGITHUB_COMMENT_TOKEN
- Personal Token for comment user. Github doc
Available parameters:
usage: CommentCI [-h|--help] -o|--github-owner "" -r|--github-repository
"" [-s|--single-comment ""] [-c|--codify]
[-f|--file "" [-f|--file "" ...]]
[-l|--file-comment "" [-l|--file-comment ""
...]] -i|--issue-number [-m|--multi-comment]
Sent a comment to GitHub PR or Issue from your CI
Arguments:
-h --help Print help information
-o --github-owner Owner of the repository. User/Organisations.
-r --github-repository Name of the github repository.
-s --single-comment Single comment string to sent to GitHub.
-c --codify Put comments to the Markdown code block.
-f --file By repeating this flag you can specify multiple
files which content will be sent to comment.
-l --file-comment By repeating this flag you can specify comments for
provided files in according order.
-i --issue-number Number(id) of the Issue/PR to sent a comment.
-m --multi-comment Put each file into a separate comment in GitHub..
Default: false
Usage examples:
Single comment:
GITHUB_COMMENT_USER=user GITHUB_COMMENT_TOKEN=xxx commentci -o repo_owner -r repo_name -i 2 -s "Single comment"
Single file with a comment:
GITHUB_COMMENT_USER=user GITHUB_COMMENT_TOKEN=xxx commentci -o repo_owner -r repo_name -i 2 -c -l "Comment to example file" -f ./example.txt
Multiple files with comments:
GITHUB_COMMENT_USER=user GITHUB_COMMENT_TOKEN=xxx commentci -o repo_owner -r repo_name -i 2 -c -l "Comment to example file 1" -f ./example_1.txt -l "Comment to example file 2" -f ./example_2.txt