To implement the approval flow with the bot, whichever collection name you put in MONGO_COUNTER variable(mentioned above) should be present inside the db set by MONGO_DB_NAME. For example- suppose you have MONGO_COUNTER=counters and MONGO_DB_NAME=hubot set in your environment. Then you should have a database called "hubot" inside your mongodb. This "hubot" should contain a collection named "counters" having this structure: { _id: "ticketIdGenerator",seq: 100} To create a collection like this, go to your mongo shell and execute below steps: - use hubot
- db.createCollection("counters")
- db.counters.insert({_id: "ticketIdGenerator",seq: 100})
Info |
---|
The MONGO_TICKETIDGEN should contain the Id of the collection referred by MONGO_COUNTER. Therefore, for the above example, MONGO_TICKETIDGEN=ticketIdGenerator. |
|