Skip to content

Commit

Permalink
docs: added more examples to config.example.yaml (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
brainexe authored Feb 12, 2021
1 parent 814ab18 commit e3394c4
Showing 1 changed file with 41 additions and 35 deletions.
76 changes: 41 additions & 35 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,43 @@ allowed_users:
admin_users:
- UADMINID

# define a custom set of own commands: They match a regular expression any can call a set of other internal/custom commands
# here just some examples:
commands:

- name: deploy
trigger: "deploy (?P<branch>[\\w\\d\\-_\\.\\/]+)"
commands:
- trigger job BuildClients {{.branch}}
- trigger job Deploy {{.branch}}
- reply I deployed {{.branch}}

- name: open component bugs
trigger: "open (?P<project>(backend|mobile|frontend)) bugs"
description: "Lists open Jira bugs from a given component"
category: QA
commands:
- "add reaction :bug:"
- jql issuetype = Bug AND component = "{{.project}}" AND resolution = Unresolved ORDER BY priority DESC, created DESC
examples:
- open backend bugs
- open mobile bugs
- open frontend bugs

- name: demo
trigger: "demo (?P<ticketId>\\w+-\\d+)"
commands:
- |
{{ $ticket := jiraTicket .ticketId }}
{{ if $ticket }}
reply <!here> demo for <{{ jiraTicketUrl $ticket.Key }}|{{ $ticket.Key }}: {{ $ticket.Fields.Summary }}>
{{ else }}
reply Ticket {{ .ticketId }} not found :white_frowning_face:
{{ end }}
description: Informs the current channel about a demo of a Jira ticket. It directly posts a link to the ticket
examples:
- demo XYZ-1232

# optional Jenkins integration
jenkins:
host: #https://jenkins.example.com
Expand Down Expand Up @@ -51,41 +88,6 @@ gitlab:
# host: https://gitlab.example.de
# accesstoken: # optional when using gitlab features

logger:
level: info
file: ./bot.log

commands:
- name: thanks
trigger: (thanks|thank you|danke|sudo)
description: only replies 'nothing to thank for' and adds an reaction

commands:
- "reply nothing to thank for"
examples:
- thanks
- thank you
- danke

- name: please
description: execute the command after the keyword "please"
trigger: "please (?P<command>.*)"
commands:
- "{{.command}}"
- "add reaction :pray:"
examples:
- please deploy master to beta

- name: table flip
description: Reply the table flip emoji
trigger: "(flip|table flip)"
commands:
- "reply (╯°□°)╯︵ ┻━┻"
- "add reaction :shinto_shrine:"
- "add reaction :arrows_counterclockwise:"
examples:
- flip
- flip table

# used for the "weather" command to fetch current weather information from openweathermap.org
#open_weathermap:
Expand All @@ -101,4 +103,8 @@ commands:
# iamamobiledev: "approved_mobile"
# iamamobiledev2: "approved_mobile"

logger:
level: info
file: ./bot.log

timezone: UTC

0 comments on commit e3394c4

Please sign in to comment.