Draupnir news
This guide explains:
- Editing and viewing news items locally.
- What the style guidelines are for news items.
- What should be included in the pull request to release news items.
- The review process for news items.
Where does Draupnir news come from?ā
Draupnir news is requested from the github repository main branch version of
src/protections/DraupnirNews/draupnir_news.json. Additionally, the local
source version of this file is also used to source news. Editing news involves
editing the local copy of the news file.
Editing and viewing news items locallyā
The process for editing news items goes as follows:
-
Use a Matrix client of your choice to format a Matrix message announcing the news. This is just the same as writing a message, use markdown to structure the message however you like, within the style guidelines. You are probably better off just copying the markdown from a similar event if that is easier.
-
Once you are happy you can send the event to a test room.
-
View the event source and copy the event content into your local
draupnir_news.json. -
Create a UUID v4 for the news item. This can be done just by using
node -e "console.log(crypto.randomUUID())"or an equivalent command.
Your Draupnir news should look something like this:
{
"news": [
{
"news_id": "cd1881d2-60d0-49ad-9951-321205efa64b",
"matrix_event_content": {
"msgtype": "m.notice",
"body": "#### š° Draupnir Assembly: Call for Participation\n\nThe Longhouse Assembly is determining the next direction for the project.\n\nReview the current cycle and cast your vote:\n\nā”ļø [Join the Assembly Discussion](https://matrix.to/#/!DtwZFWORUIApKsOVWi:matrix.org?via=matrix.org&via=feline.support&via=asgard.chat)",
"format": "org.matrix.custom.html",
"formatted_body": "<h4>š° Draupnir Assembly: Call for Participation</h4>\n<p>The Longhouse Assembly is determining the next direction for the project.</p>\n<p>Review the current cycle and cast your vote:</p>\n<p>ā”ļø <a href=\"https://matrix.to/#/!DtwZFWORUIApKsOVWi:matrix.org?via=matrix.org&via=feline.support&via=asgard.chat\">Join the Assembly Discussion</a></p>\n"
}
}
]
}
Style Guidelinesā
-
Use a small header (
<h4>) with boldface and an emoji to make it look professional e.g.#### š° Draupnir Assembly: Call for Participation. -
Keep the message 1-2 sentences long and link directly to the subject matter.
-
Try to base your message off of previous events.
Creating a pull request for a news itemā
The pull request should contain the following:
DraupnirNewsin the title.- A screenshot of the news content in the description.
- Any context of the news.
- The client used to design the message.
The pull request should remain a draft until you are sure that it is ready to merge. This prevents accidents.
Here is an example pull request: https://github.com/the-draupnir-project/Draupnir/pull/984
Reviewing a pull request for a news itemā
Reviewers should take care to verify that draupnir actually sends the content as depicted in the screenshot or in any part of the pull request.