Creating an Incoming Webhook gives you a unique URL to which you send a JSON payload with the message text and some options. Perhaps when you explicitly define the examples, this circumvents the issue that causes the newline characters to be added. Setting up a Slack webhook to send plain text or simple HTML notifications to a Slack channel, Here, well enable Incoming Webhooks. Incoming Webhooks are a simple way to post messages from apps into Slack. I initially had the feeling that the newline characters are being placed as a result of your examples being auto-generated, but for some reason this wasn’t the case for Mike’s fork of your repository. Create a Slack application for the workspace. The new format includes the “examples” folder, in which you explicitly define the examples that are shown on the developer hub. To create an Incoming Webhook in Slack: Go to the Slack website, and create a workspace. If upgrading your local CircleCI CLI does not fix this, I recommend using the CircleCI Orb Developer Kit to jump start the transition to the new orb format: Taking a look at your orb, I can see that you are using the older orb format. Let’s try running circleci updateĪnd republishing the orb before taking more drastic steps. Using tabs inside the json instead of spacesįirst, I second post.I inspected the circleci/slack orb source with circleci orb source and tried a couple of things based on that: The strange thing is, the same thing doesn’t seem to happen for a similar official orb. You can see that it’s converted the multi-line JSON string into a single line, full of newline escapes, which is completely unreadable, and changes the example from being a good example to a bad one. I’m trying to provide example usage of an orb, but the example that ends up in the Orb repository is different to how I formatted it.
0 Comments
Leave a Reply. |