Skip to content

v1.6.0

Compare
Choose a tag to compare
@mathew-fleisch mathew-fleisch released this 17 Aug 22:24
· 275 commits to main since this release
fbbd22f

This minor update is a breaking change for the configuration json.

  • All .tools[].setup fields will need to be removed (and merged into .tools[].command)
  • These values are no longer a type:string and now expect an array of strings. They will be joined together with spaces and ultimately rendered as a string. This change is to help human readability of this field when running long/complex commands (For more information see: #44) :
    • .tools[].command
    • .tools[].parameters[].source
    • .dependencies[].install

In this example the existing configuration:
https://github.com/mathew-fleisch/bashbot/blob/main/examples/github-action/trigger-github-action.json

{
  "name": "Trigger a Github Action",
  "description": "Triggers an example Github Action job by repository dispatch",
  "help": "bashbot trigger-github-action",
  "trigger": "trigger-github-action",
  "location": "./examples/github-action",
  "setup": "export REPO_OWNER=mathew-fleisch && export REPO_NAME=bashbot && export SLACK_CHANNEL=${TRIGGERED_CHANNEL_ID} && export SLACK_USERID=${TRIGGERED_USER_ID}",
  "command": "./trigger.sh && echo \"Running this <https://github.com/${REPO_OWNER}/${REPO_NAME}/blob/main/.github/workflows/example-bashbot-github-action.yaml|example github action>\"",
  "parameters": [],
  "log": false,
  "ephemeral": false,
  "response": "text",
  "permissions": ["all"]
}

Would look something like

{
  "name": "Trigger a Github Action",
  "description": "Triggers an example Github Action job by repository dispatch",
  "help": "bashbot trigger-github-action",
  "trigger": "trigger-github-action",
  "location": "./examples/github-action",
  "command": [
    "export REPO_OWNER=mathew-fleisch",
    "&& export REPO_NAME=bashbot",
    "&& export SLACK_CHANNEL=${TRIGGERED_CHANNEL_ID}",
    "&& export SLACK_USERID=${TRIGGERED_USER_ID}", 
    "&& ./trigger.sh",
    "&& echo \"Running this <https://github.com/${REPO_OWNER}/${REPO_NAME}/blob/main/.github/workflows/example-bashbot-github-action.yaml|example github action>\""
  ],
  "parameters": [],
  "log": false,
  "ephemeral": false,
  "response": "text",
  "permissions": ["all"]
}

.dependencies[].install and .tools[].parameters[].source would follow the same pattern of an array of strings joined together.