Skip to content

charlesmike/charles-rest

 
 

Repository files navigation

logo

charles-rest

DevOps By Rultor.com Build Status PDD status Coverage Status Status badge

What it is:

A webapp .war - codebase behind Charles Michaels chatbot. It receives notifications read by this ejb checker and takes actions according to each of them. Any Github account can be used with this project; it's all dictated by the Github auth token used.

Say @charlesmike hello in a Github issue comment and see what happens. This blog post and the website provide more details on how to use this service.

Contribute

We are currently looking for contributors. Read this post.

  1. Open an issue regarding an improvement you thought of, or a bug you noticed, or asked to be assigned to an existing one.
  2. If the issue is confirmed, fork the repository, do the changes on a sepparate branch and make a Pull Request.
  3. After review and acceptance, the PR is merged and closed.
  4. You are automatically listed as a contributor on the project's site

Make sure the maven build

$mvn clean install

passes before making a PR.

Key technologies

If you wish to install it on your own infrastructure:

The .war should work fine on any Java EE web server. It is not bound by any server-specific property file or other things like that. Once deployed, it exposes the endpoint POST /api/notifications which accepts a JsonArray of format:

[
    ...,
    {
        "repoFullName":"owner/repoNameHere",
        "issueNumber":123
    },
    ...
]

As it is clear, a pipeline between Github Notifications API and this endpoint is needed. You can setup one of your own (respecting the above mentioned interface) or use this ejb .jar.

You will need to set the following system properties. Pay a lot of attention while configuring these, since everything relies on them.

Rest api sys props

NameValueDescription
LOG_ROOT string Optional. Place where the log files will be stored. Defaults to . (dot)
charles.rest.logs.endpoint **domain**/**charles-rest-context-root**/api/logs Mantadory. Rest endpoint from charles-rest
that returns the log of an action.
github.auth.token string Mantadory. Github agent's access token. Must be the same as for the EJB checker
phantomjsExec string Optional. Location of phantomjs executable on the server. Defaults to /usr/local/bin/phantomjs
aws.es.endpoint string Mandatory. Endpoint of AWS elasticsearch service
aws.es.region string Mandatory. Region of AWS elasticsearch service
aws.accessKeyId string Mandatory. AWS access key id
aws.secretKey string Mandatory. AWS secret key

About

Github chatbot and web-content indexer/searcher

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.5%
  • Other 0.5%