Project to scan for issues added by someone new on a Github repository and auto-reply with a fixed message.
First, you need to generate a "personal access token" so the app can access your repos:
- Go to https://github.com/settings/profile
- Click "Personal access tokens" in the left-hand menu
- Click "Generate a new token"
- Authenticate
- Enter a description and select scopes:
- check "public_repos" (and nothing else) if you want to set up on a public repo;
- check "repos" and "public_repos" (and nothing else) if you want to set up on a private repo.
- Click "Generate token" and write the token down.
Next, you need to generate a config file for the project. Create a file called consierge.conf
and paste the following into it:
consierge = {
owner = "<<OWNER_OF_GITHUB_REPO_TO_WATCH>>"
repo = "<<NAME_OF_GITHUB_REPO_TO_WATCH>>"
credentials = {
username = "<<GITHUB_USER_TO_RUN_AS>>"
accessToken = "<<PERSONAL_ACCESS_TOKEN>>"
}
messageFile = "/path/to/message/file.txt"
pollInterval = "10 seconds"
timeout = "500 milliseconds"
}
Finally, run the app as follows:
sbt run -Dconfig.file=/path/to/consierge.conf
If you want to skip creating a config file, you can specify all of the config parameters on the command line:
$ sbt run -Dconsierge.owner=OWNER_OF_GITHUB_REPO_TO_WATCH \
-Dconsierge.repo=NAME_OF_GITHUB_REPO_TO_WATCH \
-Dconsierge.credentails.username=GITHUB_USER_TO_RUN_AS \
-Dconsierge.credentails.accessToken=PERSONAL_ACCESS_TOKEN \
-Dconsierge.messageFile=/path/to/message/file.txt \
-Dconsierge.pollInterval=10s \
-Dconsierge.timeout=500ms