Skip to content

Commit

Permalink
discord.yml formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
PranshulGG committed Nov 20, 2024
1 parent 3c9a77e commit fb05681
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/discord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ jobs:
LAST_COMMIT_AUTHOR=$(git log -1 --pretty=format:'%an')
REPO_NAME=${{ github.repository }}
BRANCH_NAME=${{ github.ref_name }}
COMMIT_URL=https://github.com/${{ github.repository }}/commit/${{ github.sha }}
curl -X POST -H "Content-Type: application/json" \
-d "{
\"embeds\": [
{
\"title\": \"${LAST_COMMIT_AUTHOR} pushed to ${REPO_NAME}\",
\"url\": \"${COMMIT_URL}\",
\"description\": \"**Branch**: ${BRANCH_NAME}\n**Message**: ${LAST_COMMIT_MESSAGE}\",
\"color\": 3447003
}
Expand All @@ -46,15 +48,17 @@ jobs:
ISSUE_TITLE=${{ github.event.issue.title }}
ISSUE_NUMBER=${{ github.event.issue.number }}
ISSUE_BODY=${{ github.event.issue.body }}
ISSUE_URL=${{ github.event.issue.html_url }}
REPO_NAME=${{ github.repository }}
ACTOR=${{ github.actor }}
curl -X POST -H "Content-Type: application/json" \
-d "{
\"embeds\": [
{
\"title\": \"New Issue in ${REPO_NAME}\",
\"description\": \"**#${ISSUE_NUMBER} ${ISSUE_TITLE}**\n\n${ISSUE_BODY}\",
\"title\": \"New Issue: #${ISSUE_NUMBER} - ${ISSUE_TITLE}\",
\"url\": \"${ISSUE_URL}\",
\"description\": \"${ISSUE_BODY}\",
\"color\": 16711680,
\"footer\": {
\"text\": \"Opened by ${ACTOR}\"
Expand All @@ -72,6 +76,7 @@ jobs:
RELEASE_NAME=${{ github.event.release.name }}
RELEASE_TAG=${{ github.event.release.tag_name }}
RELEASE_BODY=${{ github.event.release.body }}
RELEASE_URL=${{ github.event.release.html_url }}
REPO_NAME=${{ github.repository }}
ACTOR=${{ github.actor }}
Expand All @@ -80,6 +85,7 @@ jobs:
\"embeds\": [
{
\"title\": \"New Release: ${RELEASE_NAME} (${RELEASE_TAG})\",
\"url\": \"${RELEASE_URL}\",
\"description\": \"${RELEASE_BODY}\",
\"color\": 65280,
\"footer\": {
Expand Down

0 comments on commit fb05681

Please sign in to comment.