WARNING This project isn't released yet, it is not working
The JHipster Bot is a Slack bot for generating JHipster applications.
.yo-rc.json
file, and then runs JHipster to create the applicationnode jhipster-bot.js
jhipster
The configuration can be setup in different ways according to your environment.
on the root of the project, create an oath.json file. The properties are:
For the application to work on Heroku you have to set the following environment variables using the command :
heroku config:set GIT_NAME=MyGithubAccount
Authentication of the user via his GitHub account.
URL
/auth/github
Method:
GET
URL Params
None
Data Params
None
Sample Call:
$.ajax({
url: "/auth/github",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
Generate a JHipster application.
URL
/generator/application
Method:
POST
URL Params
None
Data Params
{ directory : [string], applicationDescription : [Object] }
Success Response:
{ message : "The JHipster application has been generated."}
Error Response:
{ error:{code:401,message:"An error has occurred: Authentication needed to access this resource."}}
Sample Call:
$.ajax({
url: "/generator/application",
dataType: "json",
type : "POST",
data : "{"
+" directory: 'the/repo/directory', "
+" applicationDescription: "
+" { "
+" generator-jhipster: "
+" { "
+" jhipsterVersion: '3.8.0', "
+" baseName: 'jhipster', "
+" packageName: 'com.jhipster', "
+" packageFolder: 'com/jhipster', "
+" serverPort: '8080', "
+" authenticationType: 'session', "
+" hibernateCache: 'ehcache', "
+" clusteredHttpSession: false, "
+" websocket: false, "
+" databaseType: 'sql', "
+" devDatabaseType: 'h2Disk', "
+" prodDatabaseType: '', "
+" searchEngine: false, "
+" messageBroker: false, "
+" buildTool: 'maven', "
+" enableSocialSignIn: false, "
+" rememberMeKey: '59abe5c3abe885fb305b11e8d514304ccd4828c9', "
+" useSass: true, "
+" applicationType: 'monolith', "
+" testFrameworks: [ "
+" 'gatling'"
+" ], "
+" jhiPrefix: 'jhi', "
+" enableTranslation: true,"
+" nativeLanguage: 'en', "
+" languages: [ "
+" 'en', "
+" 'fr' "
+" ]"
+" }"
+" }"
+" }",
success : function(r) {
console.log(r);
}
});
Publish the project on the user's GitHub.
URL
/publisher/directory
Method:
POST
URL Params
None
Data Params
{ "directory" : [string], "repositoryName" : [string], "userName" : [string] }
Sample Call:
$.ajax({
url: "/publisher/directory",
dataType: "json",
type : "POST",
data : "{"
+" directory : 'the/repo/directory', "
+" repositoryName : 'TheRepoName', "
+" userName : 'MyGitHubAccount' "
+"}",
success : function(r) {
console.log(r);
}
});
Returns json data about a single user.
URL
/users/:name
Method:
GET
URL Params
Required:
name=[string] - the name of the user's GitHub account
Data Params
None
Success Response:
{ id : 12, name : "MyGitHubAccount", token : "be2ert56lijn0ijhg76" }
Error Response:
{ error:{code:401,message:"An error has occurred: Authentication needed to access this resource."}}
Sample Call:
$.ajax({
url: "/user/MyGitHubAccount",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});