From 691efbdb484fa2fe55f0fbe88094547d9bf59997 Mon Sep 17 00:00:00 2001 From: sivasadobe Date: Tue, 2 Jul 2024 20:39:29 +0530 Subject: [PATCH] fix: env fix --- .env.example | 3 +-- .github/workflows/src/send-slack.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 992a137..3527f48 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,3 @@ GH_TOKEN=https://github.com/settings/tokens?type=beta->generate_new_one SLACK_WH_URL=https://api.slack.com/messaging/webhooks->generate_new_webhook_url -REPO_OWNER=adobecom -REPO_NAME=cc \ No newline at end of file +GITHUB_REPOSITORY=adobecom/cc \ No newline at end of file diff --git a/.github/workflows/src/send-slack.js b/.github/workflows/src/send-slack.js index 52289d5..b574ba2 100644 --- a/.github/workflows/src/send-slack.js +++ b/.github/workflows/src/send-slack.js @@ -1,8 +1,7 @@ const { parseTextToSlackBlocks } = require("./helpers"); // Those env variables are set by an github action automatically -const owner = process.env.REPO_OWNER || ""; -const repo = process.env.REPO_NAME || ""; +const [owner, repo]=process.env.GITHUB_REPOSITORY?.split('/') || ''; const auth = process.env.GH_TOKEN; /**