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

Discord Changlogs #26

Merged
merged 5 commits into from
Jul 15, 2024
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
25 changes: 25 additions & 0 deletions .github/workflows/publish-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish Changelog

on:
workflow_dispatch:
schedule:
- cron: '0 10 * * *'

jobs:
publish_changelog:
runs-on: ubuntu-latest
steps:

- name: checkout
uses: actions/checkout@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
ref: master

- name: Publish changelog
run: Tools/actions_changelogs_since_last_run.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHANGELOG_DIR: ${{ vars.CHANGELOG_DIR }}
DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }}
continue-on-error: true
1 change: 1 addition & 0 deletions Resources/Changelog/Floof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Entries:
- author: FoxxoTrystan
changes:
- {message: 'Created the Floof Station changelog.', type: Add}
id: 1
time: '2024-7-12T00:00:00.0000000+00:00'
4 changes: 2 additions & 2 deletions Tools/actions_changelogs_since_last_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
DISCORD_SPLIT_LIMIT = 2000
DISCORD_WEBHOOK_URL = os.environ.get("DISCORD_WEBHOOK_URL")

CHANGELOG_FILE = "Resources/Changelog/DeltaVChangelog.yml"
CHANGELOG_FILE = os.environ.get("CHANGELOG_DIR")

TYPES_TO_EMOJI = {
"Fix": "🐛",
Expand Down Expand Up @@ -165,7 +165,7 @@ def send_to_discord(entries: Iterable[ChangelogEntry]) -> None:

# Flush the group to the message
message_content.write(group_text)

# Clean up anything remaining
message_text = message_content.getvalue()
if len(message_text) > 0:
Expand Down
Loading