From 5ba15ccd03341aa63b6ed2d20a051f244d95f402 Mon Sep 17 00:00:00 2001 From: PingDavidR Date: Wed, 2 Jul 2025 15:44:40 -0500 Subject: [PATCH 1/2] add slack notification with button workflow --- .github/workflows/slack-on-issue-create.yml | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/slack-on-issue-create.yml diff --git a/.github/workflows/slack-on-issue-create.yml b/.github/workflows/slack-on-issue-create.yml new file mode 100644 index 00000000..69a4caba --- /dev/null +++ b/.github/workflows/slack-on-issue-create.yml @@ -0,0 +1,42 @@ +name: Notify Slack on Issue Creation + +on: + issues: + types: [opened] + +jobs: + send-notification: + runs-on: ubuntu-latest + + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install requests + + - name: Send notification to Slack + env: + SLACK_NOTIFY_TO_CDI_JIRA_WEBHOOK: ${{ secrets.SLACK_NOTIFY_TO_CDI_JIRA_WEBHOOK }} + ISSUE_TITLE: ${{ github.event.issue.title }} + ISSUE_BODY: ${{ github.event.issue.body }} + REPOSITORY_NAME: ${{ github.repository }} + GITHUB_EVENT_ISSUE_HTML_URL: ${{ github.event.issue.html_url }} + run: | + python < Date: Wed, 2 Jul 2025 15:58:21 -0500 Subject: [PATCH 2/2] Permissions in slack-on-issue-create.yml --- .github/workflows/slack-on-issue-create.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/slack-on-issue-create.yml b/.github/workflows/slack-on-issue-create.yml index 69a4caba..5595c73c 100644 --- a/.github/workflows/slack-on-issue-create.yml +++ b/.github/workflows/slack-on-issue-create.yml @@ -1,4 +1,6 @@ name: Notify Slack on Issue Creation +permissions: + issues: read on: issues: