{"_id":"@drush-io/hubot-drush-io","_rev":"7-6de65c9721952aa1f711e8dfe61bbb2e","name":"@drush-io/hubot-drush-io","description":"Trigger custom workflow operations in chat via drush.io.","dist-tags":{"latest":"1.0.0-beta.5"},"versions":{"1.0.0-beta.1":{"name":"@drush-io/hubot-drush-io","version":"1.0.0-beta.1","description":"Trigger custom workflow operations in chat via drush.io.","main":"index.coffee","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["hubot","drush.io"],"author":{"name":"iamEAP"},"license":"MIT","dependencies":{"@drush-io/api-client":"^1.0.0-alpha.3","fernet":"^0.3.0"},"gitHead":"098befb00fe397f2d61c2dbb609369d12f3a95af","_id":"@drush-io/hubot-drush-io@1.0.0-beta.1","_npmVersion":"5.0.4","_nodeVersion":"6.10.3","_npmUser":{"name":"iameap","email":"i.am@eric.pe"},"dist":{"integrity":"sha512-w9uBZPhNKMV4bGpkYucNiXRqiAJOjrCqDmlNbFNAxZ4TXsgAlPJHDqZv8QDVcAn6iFGHsFiDKVydZfW+vqU+gg==","shasum":"664219faf3b4d5dd4d1fae81e61eaf750af98e95","tarball":"https://registry.npmjs.org/@drush-io/hubot-drush-io/-/hubot-drush-io-1.0.0-beta.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE7lh2k2cPvzGap7wENTrhxd6qSoniqZEHYTAxJHctYAIhAIllUdTA526QbIFTowoeMZ9/lsT9v4ZPZcbUxutFeCWi"}]},"maintainers":[{"name":"iameap","email":"i.am@eric.pe"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hubot-drush-io-1.0.0-beta.1.tgz_1499237813230_0.2185691308695823"},"directories":{}},"1.0.0-beta.2":{"name":"@drush-io/hubot-drush-io","version":"1.0.0-beta.2","description":"Trigger custom workflow operations in chat via drush.io.","main":"index.coffee","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["hubot","drush.io"],"author":{"name":"iamEAP"},"license":"MIT","dependencies":{"@drush-io/api-client":"^1.0.0-alpha.3","fernet":"^0.3.0"},"gitHead":"910023435e2dd45031baa2b8d7d27bed4ba6d206","_id":"@drush-io/hubot-drush-io@1.0.0-beta.2","_npmVersion":"5.0.4","_nodeVersion":"6.10.3","_npmUser":{"name":"iameap","email":"i.am@eric.pe"},"dist":{"integrity":"sha512-Ub6fC/NXysvmGe8dU/WuMkiYigjhBDRZe1msoLt905MHjza3sBprtt9AsZU3B1+0wnqQlgSG9UOUEe4IRFa7wA==","shasum":"aff276d448cf75ee3ff7163ea64b093d3262e405","tarball":"https://registry.npmjs.org/@drush-io/hubot-drush-io/-/hubot-drush-io-1.0.0-beta.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1aMi+l3ntxhFiZ7k31R4+krURjKnUzi3sZeefKw8w1AiAgFHINlHotiauMg+IR4s4SCH4Tl7UJ+iW+k3XnVs6y8w=="}]},"maintainers":[{"name":"iameap","email":"i.am@eric.pe"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hubot-drush-io-1.0.0-beta.2.tgz_1499237920006_0.7398484875448048"},"directories":{}},"1.0.0-beta.3":{"name":"@drush-io/hubot-drush-io","version":"1.0.0-beta.3","description":"Trigger custom workflow operations in chat via drush.io.","main":"index.coffee","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["hubot-scripts","hubot","drush.io"],"author":{"name":"iamEAP"},"license":"MIT","dependencies":{"@drush-io/api-client":"^1.0.0-alpha.3","fernet":"^0.3.0"},"gitHead":"c8f621bec3fa39133ad896bf1a1164db72090d01","_id":"@drush-io/hubot-drush-io@1.0.0-beta.3","_npmVersion":"5.5.1","_nodeVersion":"6.10.3","_npmUser":{"name":"iameap","email":"i.am@eric.pe"},"dist":{"integrity":"sha512-GgP+TRSly5q/GguG0y3C+o+Zg/m+ovHp/qUWNPaPFqCc3RJJZT6zn1ojrmJZGK4qRvmcFi3BCAYQ2EyJJc6FAg==","shasum":"ebd6bf02e499e714087be16b8a82d6a52dd8d117","tarball":"https://registry.npmjs.org/@drush-io/hubot-drush-io/-/hubot-drush-io-1.0.0-beta.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMikyvYU+OB4FOYhI6paEIj2cntYTV26YkY/3tP0SyRgIgecXmtwEqlHLdEWXisSmzz+q5ZV1NIbToQljmg0KTtWU="}]},"maintainers":[{"name":"iameap","email":"i.am@eric.pe"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hubot-drush-io-1.0.0-beta.3.tgz_1507972122573_0.22101763170212507"},"directories":{}},"1.0.0-beta.4":{"name":"@drush-io/hubot-drush-io","version":"1.0.0-beta.4","description":"Trigger custom workflow operations in chat via drush.io.","main":"index.coffee","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["hubot-scripts","hubot","drush.io"],"author":{"name":"iamEAP"},"license":"MIT","dependencies":{"@drush-io/api-client":"^1.0.0-alpha.3","fernet":"^0.3.0","hubot-conversation":"^1.1.1"},"gitHead":"8a14ec92c2b6f7768877feea2f1a240397c97f9c","_id":"@drush-io/hubot-drush-io@1.0.0-beta.4","_npmVersion":"5.5.1","_nodeVersion":"6.10.3","_npmUser":{"name":"iameap","email":"i.am@eric.pe"},"dist":{"integrity":"sha512-WX3T20Kdsyacr6XEFCLsqc0BqEyWzUXbdOFXdYhCP9Oc62jwaFEEPUv8iSDB1CsE/Rqbx02p1NcAo/iiK730Yw==","shasum":"89b44550629e0f2aca22a7c36813db01195440f5","tarball":"https://registry.npmjs.org/@drush-io/hubot-drush-io/-/hubot-drush-io-1.0.0-beta.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEnLVn0AOpWKB9ptU7szzOZ6DL0CESjG7liHxDtZULsyAiAaY7Fx25QuKUzN1TXiwrPvopTZdB1WZDMPyYar+srAmA=="}]},"maintainers":[{"name":"iameap","email":"i.am@eric.pe"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hubot-drush-io-1.0.0-beta.4.tgz_1508029851041_0.7276165215298533"},"directories":{}},"1.0.0-beta.5":{"name":"@drush-io/hubot-drush-io","version":"1.0.0-beta.5","description":"Trigger custom workflow operations in chat via drush.io.","main":"index.coffee","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["hubot-scripts","hubot","drush.io"],"author":{"name":"iamEAP"},"license":"MIT","dependencies":{"@drush-io/api-client":"^1.0.0-alpha.3","fernet":"^0.3.0","hubot-conversation":"^1.1.1"},"gitHead":"eebda89caaccc10aa1e12989d9108d6a76068b3f","_id":"@drush-io/hubot-drush-io@1.0.0-beta.5","_npmVersion":"5.5.1","_nodeVersion":"6.10.3","_npmUser":{"name":"iameap","email":"i.am@eric.pe"},"dist":{"integrity":"sha512-q92LQ3mTq3Y+Ns1wDGlwaJ92nm1lqoq2jYvU3q36j/KwntfHsrMTlTnLqdGP9FftnAUZqZzym6cmX+Luw5Sy1Q==","shasum":"437a8f906d81c05bf0c442f186001049279f9461","tarball":"https://registry.npmjs.org/@drush-io/hubot-drush-io/-/hubot-drush-io-1.0.0-beta.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKo4ZiNPFa1ham8zOpHUCYtfLegz8hVa7Olv0jzAPwsAIgW3PVNky9/D9Jqcf69i8gZITvBgqyVhTv4eMBGOKnrRM="}]},"maintainers":[{"name":"iameap","email":"i.am@eric.pe"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hubot-drush-io-1.0.0-beta.5.tgz_1508309157467_0.6443344799336046"},"directories":{}}},"readme":"# hubot-drush-io\n\nBase package for triggering drush.io jobs via Hubot. Features include:\n\n- Encrypted storage for drush.io API Tokens in Hubot's brain\n- Job running and list support\n- API for running commands in your custom Hubot scripts\n\nSee [`src/drush-io.coffee`](src/drush-io.coffee) for full documentation.\n\n## Installation\n\nIn hubot project repo, run:\n\n`npm install @drush-io/hubot-drush-io --save`\n\nThen add **@drush-io/hubot-drush-io** to your `external-scripts.json`:\n\n```json\n[\"@drush-io/hubot-drush-io\"]\n```\n\n## Configuration\n\n- `HUBOT_DRUSH_IO_TOKEN_FERNET_SECRETS` - The key used for encrypting your\n  tokens in the Hubot's brain. A comma delimited set of different key tokens.\n  To create one run `dd if=/dev/urandom bs=32 count=1 2>/dev/null | openssl base64`\n  on a UNIX system.\n- `HUBOT_DRUSH_IO_DEFAULT_PROJECT` - Optional. A drush.io project-ish (project\n  ID or project machine name) that will be used when running jobs if no project\n  is provided. Recommended unless you use multiple/many drush.io projects.\n- `HUBOT_DRUSH_IO_DEFAULT_API_TOKEN` - Optional. A drush.io API token that, if\n  set, is used when a user with no API token set attempts to run a drush.io job.\n  Only set this if you need to.\n\n## Usage\n\nFor complete and up-to-date usage details, type the following in your chat\nclient `hubot help drush.io` and check the \"Sample Interaction\" section\nbelow.\n\nCommon commands include:\n- `hubot drush-io set token {drush.io api token}` - Intended for private chat\n  with the bot, this command stores a user's drush.io API token in Hubot's\n  brain (encrypted) so that jobs run by the user leverage the user's drush.io\n  credentials and permissions.\n- `hubot drush-io list jobs` - Shows a list of jobs that can be run.\n- `hubot drush-io run job {job name}` - Runs a job. If the job includes\n  required or optional variables, Hubot will ask for those details.\n\n## API\n\nThis package adds functionality to `robot` that allows you to easily build\ncustom commands that trigger drush.io jobs:\n\n```coffeescript\n# Listen for the phrase \"deploy to test\"\nrobot.hear /^deploy to test$/i, (msg) ->\n  # Trigger the \"deploy-to-test\" job on \"my-project\"\n  robot.drush.io.run(msg, 'my-project', 'deploy-to-test').then (result) ->\n    msg.send result.data.log\n```\n\nThe function signature for `robot.drush.io.run` is like so:\n\n```javascript\n/**\n * Triggers a job run for a given project on drush.io using the user on the\n * provided msg.\n * \n * @param msg\n *   The res/msg object that is provided as the first argument to robot.hear's\n *   callback. Used to determine the user and retrieve their token.\n * \n * @param {String} project\n *   The machine name (or ID) of the drush.io project associated with the job\n *   you wish to run. If none is provided (null), the value of the environment\n *   variable HUBOT_DRUSH_IO_DEFAULT_PROJECT will be used.\n * \n * @param {String} job\n *   The machine name (or ID) of the drush.io job you wish to run.\n *\n * @param {Object} vars\n *   An optional key/value pair of variables to send as context for your job\n *   run. Defaults to an empty object.\n *\n * @param {Boolean} waitForResponse\n *   An optional boolean indicating whether the run should be synchronous\n *   (meaning, wait completely for the job run to execute so that the run's log\n *   can be read and/or printed), or asynchronous (meaning, don't wait for\n *   job execution, just wait for it to be queued). Defaults to true.\n *   \n * @return Promise\n *   If waitForResponse is true, this will resolve with the executed job run\n *   once complete. If waitForResponse is false, this will resolve as soon as\n *   the job run is successfully queued.\n */\nfunction run(msg, project, job, vars, waitForResponse) {}\n```\n\n## Notes\n\nMost of this code was extracted from [hubot-gh-token](https://github.com/hubot-scripts/hubot-gh-token)\n, which uses code from [hubot-deploy](https://github.com/atmos/hubot-deploy),\nwhich uses code from [hubot-vault](https://github.com/ys/hubot-vault).\n\nThis script is similar to\n[hubot-github-identity](https://github.com/tombell/hubot-github-identity) but\nallows users to set tokens in chat instead of through Hubot's http listener.\n\n## Sample Interaction\n\n```\nuser1>> hubot drush-io token set eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M\nhubot>> Your drush.io API token is valid. I stored it for future use.\nuser1>> hubot drush-io token verify\nhubot>> Your drush.io API token is valid.\nuser1>> hubot drush-io list jobs\nhubot>> Create Multidev (create-multidev)\n        Deploy to Prod (deploy-to-prod)\nuser1>> hubot drush-io run create-multidev\nhubot>> What should MULTIDEV_NAME be set to?\nuser1>> my-feat\nhubot>> Okay, lemme see what I can do.\nhubot>> Looks to have gone smoothly! Here's what I heard back:\nhubot>> ................................\n        [2017-10-05 20:04:07] [info] Created Multidev environment \"my-feat\"\nuser1>> hubot drush-io token reset\nhubot>> I nuked your drush.io API token. You may not be able to run drush.io jobs until you set another token.\n```\n","maintainers":[{"name":"iameap","email":"i.am@eric.pe"}],"time":{"modified":"2022-04-05T05:42:54.278Z","created":"2017-07-05T06:56:53.445Z","1.0.0-beta.1":"2017-07-05T06:56:53.445Z","1.0.0-beta.2":"2017-07-05T06:58:40.087Z","1.0.0-beta.3":"2017-10-14T09:08:42.630Z","1.0.0-beta.4":"2017-10-15T01:10:51.116Z","1.0.0-beta.5":"2017-10-18T06:45:57.590Z"},"keywords":["hubot-scripts","hubot","drush.io"],"author":{"name":"iamEAP"},"license":"MIT","readmeFilename":"README.md","users":{"vghhkjh":true}}