Skip to content

Commit

Permalink
chore: update discord bot
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Feb 12, 2024
1 parent cf1cd10 commit 6be2346
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions discord-webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ async function run() {
await setupEnvironment()

const refType = env.REF_TYPE
// vite repo is not cloned when release
// volar repo is not cloned when release
const permRef = refType === 'release' ? undefined : await getPermanentRef()

const targetText = createTargetText(refType, env.REF, permRef, env.REPO)

const webhookContent = {
username: `vite-ecosystem-ci (${env.WORKFLOW_NAME})`,
avatar_url: 'https://github.com/vitejs.png',
username: `volar-ecosystem-ci (${env.WORKFLOW_NAME})`,
avatar_url: 'https://github.com/volarjs.png',
embeds: [
{
title: `${statusConfig[env.STATUS].emoji} ${env.SUITE}`,
Expand Down Expand Up @@ -167,7 +167,7 @@ function createTargetText(
permRef: string | undefined,
repo: string,
) {
const repoText = repo !== 'vitejs/vite' ? `${repo}:` : ''
const repoText = repo !== 'volarjs/volar.js' ? `${repo}:` : ''
if (refType === 'branch') {
const shortRef = permRef?.slice(0, 7)
const link = `https://github.com/${repo}/commits/${permRef || ref}`
Expand Down

0 comments on commit 6be2346

Please sign in to comment.