Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Remove tokenize phase #26

Remove tokenize phase

Remove tokenize phase #26

Workflow file for this run

name: Discord
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
env:
DISCORD_COMMITS_WEBHOOK: ${{ secrets.DISCORD_COMMITS_WEBHOOK }}
with:
script: |
const commit = await github.rest.repos.getCommit({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha,
});
await fetch(process.env.DISCORD_COMMITS_WEBHOOK, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
embeds: [{
color: commit.data.commit.verification?.verified ? 0x3fb950 : undefined,
description: `[\`${commit.data.sha.slice(0, 7)}\`](${commit.data.html_url}) ${commit.data.commit.message}`,
author: {
name: context.actor,
url: commit.data.author?.html_url,
icon_url: commit.data.author?.avatar_url,
},
timestamp: commit.data.commit.author?.date,
}],
username: "GitHub",
avatar_url: "https://github.com/github.png",
}),
});