fix(servers): put correct url in embed title
All checks were successful
Discord / discord commits (push) Successful in 1m14s
All checks were successful
Discord / discord commits (push) Successful in 1m14s
This commit is contained in:
parent
594a9fd715
commit
ba42cfa88a
2 changed files with 6 additions and 7 deletions
|
@ -1,11 +1,8 @@
|
||||||
name: Discord
|
name: Discord
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
- workflow_dispatch
|
||||||
push:
|
- push
|
||||||
paths:
|
|
||||||
- 'devices/oksys/*'
|
|
||||||
- 'devices/servivi/*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
discord_commits:
|
discord_commits:
|
||||||
|
@ -14,6 +11,8 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
||||||
|
if: contains(github.event.head_commit.message, '(servers)')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v3
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
|
|
@ -15,13 +15,13 @@ const commit = JSON.stringify({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
title: 'New commit containing changes to server configs:',
|
title: 'New commit containing changes to server configs:',
|
||||||
description: commitInfo.commit.message,
|
description: commitInfo.commit.message,
|
||||||
url: commitInfo.url,
|
url: commitInfo.html_url,
|
||||||
author: {
|
author: {
|
||||||
name: commitInfo.author.username,
|
name: commitInfo.author.username,
|
||||||
icon_url: commitInfo.author.avatar_url,
|
icon_url: commitInfo.author.avatar_url,
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
// Diff: await (await fetch(`${last['url']}.diff`)).text()
|
// Diff: await (await fetch(`${commitInfo.url}.diff`)).text()
|
||||||
});
|
});
|
||||||
|
|
||||||
const post = await fetch(`${DATA.webhook}?wait=true`, {
|
const post = await fetch(`${DATA.webhook}?wait=true`, {
|
||||||
|
|
Loading…
Reference in a new issue