Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOML ➜ YAML #274

Merged
merged 7 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/workflows/embeds.jar
Binary file not shown.
46 changes: 46 additions & 0 deletions .github/workflows/embeds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'YAML Checker'
on:
pull_request:
types: [ 'opened', 'reopened', 'synchronize' ]
pull_request_target:
types: [ 'opened', 'reopened', 'synchronize' ]
draft: false

jobs:
check_code:
runs-on: 'ubuntu-latest'
steps:
- name: 'Clone Repository'
uses: 'actions/checkout@v2'

- name: 'Install Java'
uses: 'actions/[email protected]'
with:
distribution: 'adopt'
java-version: '17'
check-latest: false

- name: 'Verify embeds.yml'
id: 'verify'
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "results<<$EOF" >> $GITHUB_ENV
java -jar .github/workflows/embeds.jar embeds.yml >> $GITHUB_ENV
echo "$EOF" >> $GITHUB_ENV

- name: 'Find Comment'
uses: 'peter-evans/find-comment@v2'
id: 'fc'
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'YAML Checker'

- name: 'Create Review'
uses: 'peter-evans/create-or-update-comment@v3'
with:
edit-mode: 'replace'
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
${{ env.results }}
37 changes: 0 additions & 37 deletions .github/workflows/tomlchecker.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
.env.development.local
.env.test.local
.env.production.local
.idea/

npm-debug.log*
yarn-debug.log*
Expand Down
74 changes: 70 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,79 @@ There is a [Markdown template](https://raw.githubusercontent.com/Bloom-host/Bloo
You can also see [a formatted version of the template](https://docs.bloom.host/extras/template/) to see what the formatted elements will look like when imported into the documentation website.

---
## BloomBot embeds
## BloomBot Embeds

You can also contribute to the embeds used by BloomBot in the Discord where a command is used, and it can provide troubleshooting information or quick information to users such as those who are requesting support.

You can edit [`embeds.yml`](/embeds.yml) and this can be contributed along with documentation changes and can be contributed in the same PR.

Here is the format of the embeds:
![img](https://raw.githubusercontent.com/Bloom-host/BloomDocs/master/static/imgs/discord/embed-help.png)

```yml
embed_name:
# A list of aliases that can be used to call the command
# You can also do the short format: aliases: ['embed_name_alias', 'another_alias']
aliases:
- 'embed_name_alias'
- 'another_alias'
# The text of the message
text: 'Suspendisse vitae sem imperdiet suspicit magna sed'
# The title of the embed
title: 'Vestibulum luctus fermentum nisl'
# The icon next to the title
title-icon: '%guildicon%'
# The thumbnail of the embed
thumbnail: '%guildicon%'
# The description of the embed. |+ keeps new lines, > does not
description: |+
Lorem [ipsum dolor](https://example.tld) `consectetur adpicing elit`. **Morbi id lorem turpis fascillisis**
veneantis eget dapibus est. _Prasent sed_ est et ~~lectus secleisque~~ lacina.

```yaml
natoque: "Vivamus dapibus ex id"
tortor:
- porta
- gravida
```
# A list of fields. Each can have a title, a description and whether they are inline
fields:
- title: 'Etiam magna nulla, sollicitudin necleo at'
description: |+
Etiam maximus augue at velit cornmcxio, eu suscipit
nisl consequat. Aliquam sollicitudin metus quis justo
aliquet, eu convallis sem porta. Praesent leo
nunc, id sodales rugna placerat sed. Mauris
dignissim pretium cma.
inline: false
- title: ''
description: ''
inline: false
- title: 'Mauris dignissim pretium porta.'
description: 'Etiam magna nulla, sollicitudn nec leo at.'
inline: true
- title: 'Etiam maximum augue'
description: 'In hac habitssa platea'
inline: true
- title: 'Nulla molestie sapien sit'
description: 'Prasend sed est et'
inline: true
# The image of the embed
image: 'https://bloom.host/favicon/favicon-og.png'
# The footer of the embed
footer: 'Phasellus effictur dictum sem egel pretium'
# A list of buttons. [ <display name>, <link>, <emoji>, <order> ]
buttons:
- ['Label', 'https://example.tld', '1️⃣' ]
- ['Label', 'https://example.tld', '2️⃣' ]
- ['Label', 'https://example.tld', '3️⃣' ]
```

You can also contribute to the embeds used by BloomBot in the Discord where a command is used and it can provide troubleshooting information or quick information to users such as those who are requesting support.
Users with the `@Gardener` role can use the `!et` (embed test) command with YAML code to quickly test commands.

You can edit [`embeds.toml`](/embeds.toml) and this can be contributed along with documentation changes and can be contributed in the same PR.
You can use these global placeholders anywhere: `%useravatar%`, `%guildicon%`

If you are attempting to add something to add something to these, please see the [formatting guide](https://gist.github.com/NotGeri/cb11552ab7a12e20ab495a20826c341f) on how to add embeds (there is a specific format the embed must follow.)
If you have any questions or concerns, please ask in our Discord!

Please note that changes are not instant and may take up to 24 hours to apply.

Expand Down
Loading
Loading