Matthias Kruk [Sun, 5 Jun 2022 23:57:48 +0000 (08:57 +0900)]
include/gitlab: Make urlencode function more extensible
Because _gitlab_urlencode() is a simple string replacement, it is
not very extensible and does not handle more than one replacement.
This commit rewrites _gitlab_urlencode() to use an associative
array to store replacement patterns, allowing the function to be
easily extended. For testing, this commit also adds a pattern to
escape comma (',') characters in URLs.
Matthias Kruk [Wed, 16 Feb 2022 04:07:07 +0000 (13:07 +0900)]
include/slack.sh: Add module for interacting with Slack
This commit adds the slack module, which implements functions for
posting messages to private conversations and channels, as well as
formatting functions for Slack's markdown flavor.
Function names in the gitlab module do not follow a consistent naming
convention, making them rather irritating to use.
This commit makes sure function names in the gitlab module are
consistent in their naming. Further, this commit makes sure the log
module is used for printing error messages, where necessary.